/** * @test */ public function cleanUpWithDeepCleanup() { // Creates a dummy record (and marks that table as dirty). $this->subject->createRecord('tx_oelib_test'); // Creates a dummy record directly in the database without putting this // table name to the list of dirty tables. Tx_Oelib_Db::insert('tx_oelib_test_article_mm', array('is_dummy_record' => 1)); // Deletes all dummy records. $this->subject->cleanUp(TRUE); // Checks whether ALL dummy records were deleted (independent of the // list of dirty tables). $allowedTables = $this->subject->getListOfDirtyTables(); foreach ($allowedTables as $currentTable) { self::assertSame(0, $this->subject->countRecords($currentTable), 'Some test records were not deleted from table "' . $currentTable . '"'); } }