/** * @test */ public function existsRecordWithUidIgnoresNonDummyRecords() { $uid = Tx_Oelib_Db::insert('tx_oelib_test', array('title' => 'foo')); $testResult = $this->subject->existsRecordWithUid('tx_oelib_test', $uid); Tx_Oelib_Db::delete('tx_oelib_test', 'uid = ' . $uid); // We need to do this manually to not confuse the auto_increment counter // of the testing framework. $this->subject->resetAutoIncrement('tx_oelib_test'); self::assertFalse($testResult); }
/** * @test */ public function insertForTableWithUidReturnsUidOfCreatedRecord() { $uid = Tx_Oelib_Db::insert('tx_oelib_test', array('is_dummy_record' => 1)); $this->testingFramework->markTableAsDirty('tx_oelib_test'); self::assertTrue($this->testingFramework->existsRecordWithUid('tx_oelib_test', $uid)); }