lithium\tests\cases\test\MockerChainTest::testCalledWith PHP Метод

testCalledWith() публичный Метод

public testCalledWith ( )
    public function testCalledWith()
    {
        $mock = new \lithium\tests\mocks\test\mockStdClass\Mock();
        $mock->method1('foo');
        $chain = Mocker::chain($mock);
        $this->assertTrue($chain->called('method1')->success());
        $this->assertFalse($chain->called('method1')->with('bar')->success());
        $this->assertTrue($chain->called('method1')->with('foo')->success());
        $this->assertFalse($chain->called('method1')->with('foo', 'bar')->success());
    }