Re: [Wikitech-l] Using test doubles to test code with external dependencies

2013-03-06 Thread Chris McMahon
+1,000,000 On Wed, Mar 6, 2013 at 5:42 PM, Rob Lanphier wrote: > On Tue, Mar 5, 2013 at 1:25 PM, Ori Livneh wrote: > > If you are interested, check out the example, and the relevant chapter > in the PHPUnit docs. > > > > https://gerrit.wikimedia.org/r/#/c/49612/1/tests/MathTexvcTest.php > > > >

Re: [Wikitech-l] Using test doubles to test code with external dependencies

2013-03-06 Thread Rob Lanphier
On Tue, Mar 5, 2013 at 1:25 PM, Ori Livneh wrote: > A short while ago I wrote a set of three PHP unit tests for Math that use > test doubles to stub out external dependencies (in this case, the > database-backed cache and the texvc executable). My intent was to demonstrate > the technique to an

[Wikitech-l] Using test doubles to test code with external dependencies

2013-03-05 Thread Ori Livneh
A short while ago I wrote a set of three PHP unit tests for Math that use test doubles to stub out external dependencies (in this case, the database-backed cache and the texvc executable). My intent was to demonstrate the technique to another developer, so I commented the code extensively. It oc