by mattsah on 1/12/13, 10:03 PM with 37 comments
by freework on 1/13/13, 12:03 AM
by sentiental on 1/12/13, 11:02 PM
Also, how often is it useful to define a class at test time that is initialized by production code (from the section I Still Have Serious Dependency Issues!). This seems like an unlikely use case.
by 0x0 on 1/13/13, 12:30 AM
by wvenable on 1/13/13, 3:23 AM
Parody\Mime::create('Vendor\Class\Project')
-> onCall('method') -> expect('argument one') -> give('response one')
-> onCall('method') -> expect('argument two') -> give('response two')
-> resolve();
When one could just use anonymous functions to give the same result with less API-as-code. Parody\Mime::create('Vendor\Class\Project')
-> onCall('method', function($param) {
if ($param == 'argument one') return 'response one';
if ($param == 'argument two') return 'response two';
) -> resolve();
This is more flexible, less code for the framework, and easier to learn.by Gigablah on 1/13/13, 12:07 AM
by parf73 on 1/13/13, 2:07 AM