lithium\tests\cases\data\EntityTest::testPropertyAccess PHP Метод

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

public testPropertyAccess ( )
    public function testPropertyAccess()
    {
        $entity = new Entity(array('model' => 'lithium\\tests\\mocks\\data\\MockPost', 'exists' => false));
        $this->assertEqual('lithium\\tests\\mocks\\data\\MockPost', $entity->model());
        $this->assertFalse($entity->exists());
        $entity = new Entity(array('exists' => true));
        $this->assertTrue($entity->exists());
        $expected = array('exists' => true, 'data' => array(), 'update' => array(), 'increment' => array());
        $this->assertEqual($expected, $entity->export());
    }