public function testRoleActionRecordCreateDelete() { print __METHOD__ . "\n"; for ($i = 0; $i < 10; ++$i) { $rar = TestUtil::createRoleActionRecord(); $this->em->persist($rar); } //Commit the entites to the database $this->em->flush(); //Check this via the database $con = $this->getConnection(); $result = $con->createQueryTable('results', "SELECT * FROM RoleActionRecords"); //Assert that data exist in the database for this service $this->assertEquals(10, $result->getRowCount()); }