Example #1
0
 public function tearDown()
 {
     parent::tearDown();
     if ($this->generateRandomString) {
         $this->randomStringGenerator->writeToPhpFile(__DIR__ . '/MockRandomStrings/DefaultTestRandomString.php', 'Mesour\\DropDownTests\\MockRandomStrings\\DefaultTestRandomString');
     }
 }
Example #2
0
 protected function setUp()
 {
     parent::setUp();
     $sl = $this->getContainer();
     $services = $sl->findByType('Nette\\Application\\IRouter');
     $this->router = $sl->createService($services[0]);
 }
Example #3
0
 protected function setUp()
 {
     parent::setUp();
     try {
         $this->driver = $this->getDriver();
     } catch (PrerequisiteException $e) {
         Environment::skip($e->getMessage());
     }
 }
 function setUp()
 {
     parent::setUp();
     if (!$this->databaseExists) {
         $this->createTempDatabase();
         self::registerInstance($this);
     }
     try {
         $this->importFile($this->filename);
     } catch (\Exception $e) {
         \Tester\Assert::fail("Failed loading init SQL file: " . $e->getMessage());
     }
     $this->resetQueries();
 }
 protected function tearDown()
 {
     parent::tearDown();
     Mockery::close();
 }
Example #6
0
function run(\Tester\TestCase $testCase)
{
    $testCase->run(isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : NULL);
}
Example #7
0
 protected function setUp()
 {
     parent::setUp();
     Tester\Environment::lock('mysql_database', __DIR__ . '/../temporary');
     $this->database = $this->connection();
 }
 protected function tearDown()
 {
     parent::tearDown();
     $this->databaseTester->clearDatabase();
 }
 protected function tearDown()
 {
     $this->lifeCycle->onTearDown();
     parent::tearDown();
 }
 function setUp()
 {
     parent::setUp();
     $this->tempDir = false;
 }
Example #11
0
 /**
  * This method is called before a test is executed.
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     Tester\Environment::lock('database', __DIR__ . '/../temp');
     $this->connection->loadFile(__DIR__ . '/../DBstructure.sql');
 }
Example #12
0
 public function runTest($name, array $args = array())
 {
     try {
         parent::runTest($name, $args);
         $this->seleniumContext->takeDown();
     } catch (\Exception $e) {
         if (Debugger::$browser && ($tracy = Debugger::log($e))) {
             exec(Debugger::$browser . ' ' . escapeshellarg($tracy));
         }
         $this->seleniumContext->takeDown();
         throw $e;
     }
 }