コード例 #1
0
ファイル: ModelTest.php プロジェクト: Konafets/oelib
 protected function setUp()
 {
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_oelib');
     Tx_Oelib_MapperRegistry::getInstance()->activateTestingMode($this->testingFramework);
     $this->dataMapper = Tx_Oelib_MapperRegistry::get('Tx_Oelib_Tests_Unit_Fixtures_TestingMapper');
     $uid = $this->createTestRecord();
     $this->subject = $this->dataMapper->find($uid);
 }
コード例 #2
0
ファイル: DataMapperTest.php プロジェクト: Konafets/oelib
 protected function setUp()
 {
     $this->testingFramework = new Tx_Oelib_TestingFramework('tx_oelib');
     Tx_Oelib_MapperRegistry::getInstance()->activateTestingMode($this->testingFramework);
     $this->subject = Tx_Oelib_MapperRegistry::get('Tx_Oelib_Tests_Unit_Fixtures_TestingMapper');
 }
コード例 #3
0
ファイル: MapperRegistryTest.php プロジェクト: Konafets/oelib
 /**
  * @test
  */
 public function getAfterInstanceWithActivatedTestingModeWasPurgedReturnsMapperWithoutTestingLayer()
 {
     Tx_Oelib_MapperRegistry::getInstance()->activateTestingMode(new Tx_Oelib_TestingFramework('tx_oelib'));
     Tx_Oelib_MapperRegistry::purgeInstance();
     self::assertNotInstanceOf('Tx_Oelib_Tests_Unit_Fixtures_TestingMapperTesting', Tx_Oelib_MapperRegistry::get('Tx_Oelib_Tests_Unit_Fixtures_TestingMapper'));
 }