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

testSetData() public method

Test the ability to set multiple field's values, and that they can be read back.
public testSetData ( )
    public function testSetData()
    {
        $this->assertEmpty($this->_record->data());
        $expected = array('id' => 1, 'name' => 'Joe Bloggs', 'address' => 'The Park');
        $this->_record->set($expected);
        $this->assertEqual($expected, $this->_record->data());
        $this->assertEqual($expected, $this->_record->to('array'));
        $this->assertEqual($expected['name'], $this->_record->data('name'));
    }