/** * Test insertComment function for a reply comment. */ public function testInsertCommentReply() { static::$eventModel->insertComment(1, 1, 2, 'Bring your own beverages.'); $expectedTable = (new PHPUnit_ArrayDataSet(array('Comment' => array(parent::createCommentObject(1, 1, 1, 1, 'Hi'), parent::createCommentObject(2, 1, 2, 2, 'Do I need to bring anything?'), parent::createCommentObject(3, 1, 2, 1, 'Hello'), parent::createCommentObject(4, 1, 1, 2, 'Bring your own beverages.')))))->getTable('Comment'); $actualTable = $this->getConnection()->createQueryTable('Comment', 'SELECT * FROM Comment WHERE EventID = 1'); $this->assertEquals(4, $this->getConnection()->getRowCount('Comment')); $this->assertTablesEqual($expectedTable, $actualTable); }