예제 #1
0
 public function tearDown()
 {
     parent::tearDown();
     if ($this->emptySqlDumpFile) {
         unlink($this->emptySqlDumpFile);
     }
 }
예제 #2
0
 public function setUp()
 {
     parent::setUp();
     Translator::registerDomain('icingatest', BaseTestCase::$testDir . '/res/locale');
 }
예제 #3
0
 public function tearDown()
 {
     parent::tearDown();
     Mockery::close();
     // Necessary because some tests run in a separate process
 }
예제 #4
0
 public function tearDown()
 {
     parent::tearDown();
     system('rm -rf ' . $this->baseDir);
 }
예제 #5
0
 public function tearDown()
 {
     parent::tearDown();
     Hook::clean();
 }
예제 #6
0
 public function tearDown()
 {
     parent::tearDown();
     unlink($this->target);
 }
예제 #7
0
        }
        /**
         * Setup provider for testcase
         *
         * @param   string|DbConnection|null $resource
         */
        public function setupDbProvider($resource)
        {
            if (!$resource instanceof DbConnection) {
                if (is_string($resource)) {
                    $this->markTestSkipped('Could not initialize provider: ' . $resource);
                } else {
                    $this->markTestSkipped('Could not initialize provider');
                }
                return;
            }
            $adapter = $resource->getConnection();
            try {
                $adapter->getConnection();
            } catch (Exception $e) {
                $this->markTestSkipped('Could not connect to provider: ' . $e->getMessage());
            }
            $tables = $adapter->listTables();
            foreach ($tables as $table) {
                $adapter->exec('DROP TABLE ' . $table . ';');
            }
        }
    }
    BaseTestCase::setupTimezone();
    BaseTestCase::setupDirectories();
}
예제 #8
0
 /**
  * Reset config dir
  */
 public function tearDown()
 {
     parent::tearDown();
     Config::$configDir = $this->oldConfigDir;
 }
예제 #9
0
 public function setUp()
 {
     parent::setUp();
     $this->sampleData = array((object) array('host' => 'localhost', 'problem' => '1', 'service' => 'ping', 'state' => '2', 'handled' => '1'), (object) array('host' => 'localhost', 'problem' => '1', 'service' => 'www.icinga.org', 'state' => '0', 'handled' => '0'), (object) array('host' => 'localhost', 'problem' => '1', 'service' => 'www.icinga.org', 'state' => '1', 'handled' => '0'));
 }
예제 #10
0
 public function tearDown()
 {
     parent::tearDown();
     unlink($this->tempFile);
     unlink($this->tempFile2);
 }