expect($foo)->toReceiveNext('bar');
$foo->message();
$foo::version();
$foo->bar();
});
it("expects called methods to not be called in a different order", function () {
$foo = new Foo();
expect($foo)->toReceive('message');
expect($foo)->not->toReceiveNext('bar');
$foo->bar();
$foo->message();
});
it("expects to work as `toReceive` for the first call", function () {
$foo = new Foo();
expect($foo)->toReceiveNext('message');
$foo->message();
});
it("expects called methods are consumated", function () {
$foo = new Foo();
expect($foo)->toReceive('message');
expect($foo)->not->toReceiveNext('message');
$foo->message();
});
it("expects called methods are consumated using classname", function () {
$foo = new Foo();
expect('Kahlan\\Spec\\Fixture\\Plugin\\Pointcut\\Foo')->toReceive('message');
expect('Kahlan\\Spec\\Fixture\\Plugin\\Pointcut\\Foo')->not->toReceiveNext('message');
$foo->message();
});
});
});