lithium\tests\cases\data\ModelTest::testFindByObjectKey PHP Метод

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

Tests that objects can be passed as keys to Model::find() and be properly translated to query conditions.
public testFindByObjectKey ( )
    public function testFindByObjectKey()
    {
        $key = (object) array('foo' => 'bar');
        $result = MockPost::find($key);
        $this->assertEqual(array('id' => $key), $result['query']->conditions());
    }
ModelTest