kahlan\spec\fixture\plugin\pointcut\Foo::message PHP Method

message() public method

public message ( $message = null )
    public function message($message = null)
    {
        if ($message === null) {
            return $this->_message;
        }
        $this->_message = $message;
    }

Usage Example

Example #1
0
            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();
        });
    });
});
All Usage Examples Of kahlan\spec\fixture\plugin\pointcut\Foo::message