lithium\tests\cases\data\entity\RecordTest::testDataPropertyAccess PHP Method

testDataPropertyAccess() public method

Tests that a record's fields are accessible as object properties.
    public function testDataPropertyAccess()
    {
        $data = array('title' => 'Test record', 'body' => 'Some test record data');
        $this->_record = new Record(compact('data'));
        $this->assertEqual('Test record', $this->_record->title);
        $this->assertTrue(isset($this->_record->title));
        $this->assertEqual('Some test record data', $this->_record->body);
        $this->assertTrue(isset($this->_record->body));
        $this->assertNull($this->_record->foo);
        $this->assertFalse(isset($this->_record->foo));
    }