lithium\tests\cases\data\EntityTest::testRespondsTo PHP Method

testRespondsTo() public method

public testRespondsTo ( )
    public function testRespondsTo()
    {
        $model = $this->_model;
        $data = array('foo' => true);
        $entity = new Entity(compact('model', 'data'));
        $this->assertTrue($entity->respondsTo('foobar'));
        $this->assertTrue($entity->respondsTo('findByFoo'));
        $this->assertFalse($entity->respondsTo('barbaz'));
        $this->assertTrue($entity->respondsTo('model'));
        $this->assertTrue($entity->respondsTo('instances'));
    }