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