Skip to content
PHPMockery extension to create stubs 'MyClass' => array('method1'=>'test', 'method2->foo(1,2)->foo(bar)' => 'result'))
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
library
test
README.md
composer.json
phpunit.xml

README.md

Mockery extension to quickly create stubs, supporting chains with arguments

similar to Mockery chain but supports the multiple method arguments

Example

$stub = MockeryStub::stub('MyClass', array(
    // simple method stub
   'foo' => '[1]',
   // chain and arguments
   'getServiceLocator()->get(EntityManager)->getRepository(User)->find(1,2)' => '[2]'
));

$stub->foo() // [1]
$stub->get('EntityManager')->getRepository('User')->find(1, 2) // [2]

See unit test class for more examples

You can’t perform that action at this time.