Exemplo n.º 1
0
 /**
  * @test
  */
 public function resetAutoIncrementLazilyCleansUpsAfterOneNewRecordWithThresholdOfOne()
 {
     $this->subject->resetAutoIncrement('tx_phpunit_test');
     $oldAutoIncrement = $this->subject->getAutoIncrement('tx_phpunit_test');
     $this->subject->setResetAutoIncrementThreshold(1);
     $latestUid = $this->subject->createRecord('tx_phpunit_test');
     $this->subject->deleteRecord('tx_phpunit_test', $latestUid);
     $this->subject->resetAutoIncrementLazily('tx_phpunit_test');
     self::assertSame($oldAutoIncrement, $this->subject->getAutoIncrement('tx_phpunit_test'));
 }
Exemplo n.º 2
0
 /**
  * @test
  *
  * @expectedException InvalidArgumentException
  */
 public function resetAutoIncrementWithInexistentTableFails()
 {
     $this->fixture->resetAutoIncrement('tx_phpunit_DOESNOTEXIST');
 }