Lines Matching refs:will
116 of the dummy will always return `null` and the dummy will never throw any exceptions.
148 and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method.
153 $prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value')));
156 This promise will cause any call to our double's `read()` method with exactly one
163 - `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic
184 you do that by predicting how many times your method will be called. In Prophecy,
191 $user->setName('everzet')->will(function () {
196 $user->setName('everzet')->will(function ($args, $user) {
201 $user->setName('everzet')->will(function ($args) use ($user) {
260 $user->setName(Argument::type('string'))->will(function ($args) {
265 $user->setName(Argument::type('string'))->will(function ($args, $user) {
270 $user->setName(Argument::type('string'))->will(function ($args) use ($user) {
275 That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it.
287 $user->setName(Argument::type('string'))->will(function ($args) {
292 $user->setName(Argument::type('string'))->will(function ($args, $user) {
297 $user->setName(Argument::type('string'))->will(function ($args) use ($user) {
301 $user->setName(Argument::any())->will(function () {
305 Nothing. Your stub will continue behaving the way it did before. That's because of how
325 (method call), Prophecy will force you to define all the communications - it throws