lithium\tests\cases\data\ModelTest::testSimpleRecordCreation PHP Method

testSimpleRecordCreation() public method

    public function testSimpleRecordCreation()
    {
        $comment = MockComment::create(array('author_id' => 451, 'text' => 'Do you ever read any of the books you burn?'));
        $this->assertFalse($comment->exists());
        $this->assertNull($comment->comment_id);
        $expected = 'Do you ever read any of the books you burn?';
        $this->assertEqual($expected, $comment->text);
        $comment = MockComment::create(array('author_id' => 111, 'text' => 'This comment should already exist'), array('exists' => true));
        $this->assertTrue($comment->exists());
    }
ModelTest