public function testDeleteComment() { $commentTable = new CommentModel(); $beforeNum = $commentTable->getField('count(*)'); $comment = $commentTable->find(); $commentTable->deleteById($comment['id']); $afterNum = $commentTable->getField('count(*)'); $this->assertTrue(1 === $beforeNum - $afterNum); }