Stub
Stub copied to clipboard
Flexible Stub wrapper for PHPUnit's Mock Builder
\Aws\S3\S3Client has way too many magic, e.g. for method `putObject()` So when I try to mock this method it's treated as a property. Possible solution is to explicitly specify if...
So far, we cannot specify the third and subsequent arguments of [Generator::getMock](https://github.com/sebastianbergmann/phpunit-mock-objects/blob/0dfddc236629eb7ead4df2dfa3d79d548e011a3b/src/Generator.php#L79). It causes unexpected result in some case, i.e. `$cloneArguments` is always true so comparison like `with` would be...
#### What are you trying to achieve? Trying to test if method called with my params using Stub utility. ``` php $db = Stub::make( Connection::className(), [ 'quoteColumnName' => Stub::exactly(2, function($params){...
Basic support for argument expectactions in Stubs, by chaining a with() method to Expected. This is something we were really missing compared to plain PHPUnit mocks, and turned out to...
`Stub::make('traitName')` throws exception `[RuntimeException] Stubbed class traitName doesn't exist.` `Stub::makeEmpty('traitName')` dies with `PHP Fatal error: Cannot redeclare class traitName in phar:///.../codecept.phar/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php(290) : eval()'d code on line 2` PhpUnit can mock...
`Codeception\Util\Stub::atLeastOnce()`, `Codeception\Util\Stub::exactly()`, `Codeception\Util\Stub::never()`, `Codeception\Util\Stub::once()` examples do not show, that in order for those methods to work, you have to insert `\Codeception\Test\Unit`
#### What are you trying to achieve? Http client send method is called 2 times on a test I would like to make different response objects for each of them...
Hello. The following snippet demonstrates the problem I'm having. Perhaps it's a bug? ``` class SomeCest{ public function stubUpdate(UnitTester $I) { $object = new GenericClass(); $actualGetValue1= $object->getValue(); $actualAttr1= $object->attr; $Stub...