protected function setUp()
 {
     if (!in_array(ezpTestRunner::dsn()->dbsyntax, array('mysql', 'mysqli'))) {
         self::markTestSkipped("Not running MySQL nor MysQLi, skipping");
     }
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     self::$qb = new ezfeZPSolrQueryBuilderTester();
     self::$findINI = eZINI::instance('ezfind.ini');
     self::$siteINI = eZINI::instance('site.ini');
 }
 public function tearDown()
 {
     eZPolicyLimitation::removeByID($this->policy->attribute('id'));
     eZPolicy::removeByID($this->policy->attribute('id'));
     $this->policy = null;
     parent::tearDown();
 }
 public function tearDown()
 {
     $this->userObject = null;
     $this->userEmail = null;
     $this->userLogin = null;
     parent::tearDown();
 }
 public function tearDown()
 {
     $this->testURI = null;
     $this->postParams = array();
     ezpINIHelper::restoreINISettings();
     parent::tearDown();
 }
Example #6
0
 public function setUp()
 {
     parent::setUp();
     eZContentLanguage::addLanguage('xxx-XX', 'XXXX');
     ezpINIHelper::setINISetting('site.ini', 'RegionalSettings', 'SiteLanguageList', array('xxx-XX', 'eng-GB'));
     eZContentLanguage::clearPrioritizedLanguages();
 }
    /**
     * Called by PHPUnit after each test.
     */
    public function tearDown()
    {
        // Log in as whoever was logged in
        eZUser::setCurrentlyLoggedInUser( $this->currentUser, $this->currentUser->attribute( 'id' ) );

        parent::tearDown();
    }
Example #8
0
 public function setUp()
 {
     parent::setUp();
     $this->norskLanguage = eZContentLanguage::addLanguage("nor-NO", "Norsk");
     $this->englishLanguage = eZContentLanguage::fetchByLocale("eng-GB");
     $this->frenchLanguage = eZContentLanguage::addLanguage("fre-FR", "Français");
 }
    public function tearDown()
    {
        eZContentLanguage::removeLanguage( 'nno-NO' );
        eZContentLanguage::removeLanguage( 'dan-DK' );

        parent::tearDown();
    }
 public function setUp()
 {
     // Verify that the clusterClass for each implementation is properly defined
     if ($this->clusterClass === false) {
         $this->markTestSkipped("Test class " . get_class($this) . " does not provide the clusterClass property");
     }
     return parent::setUp();
 }
 /**
  * Test case teardown
  * Restores the INI settings changed in setUp
  */
 public function tearDown()
 {
     eZDB::instance()->query('DELETE FROM ezurlwildcard');
     eZURLWildcard::expireCache();
     clearstatcache();
     sleep(1);
     parent::tearDown();
 }
 /**
  * Test case teardown
  */
 public function tearDown()
 {
     eZURLWildcard::removeByIDs(array($this->wildcard->attribute('id')));
     eZURLWildcard::expireCache();
     clearstatcache();
     sleep(1);
     parent::tearDown();
 }
Example #13
0
 /**
  * tearDown():
  * - deletes the admin PAEX object if it still exists
  **/
 public function tearDown()
 {
     parent::tearDown();
     // remove the PAEX object if it hasn't been removed by the test
     if (eZPaEx::fetch($this->paex->attribute('contentobject_id'))) {
         eZPaEx::removePaex($this->paex->attribute('contentobject_id'));
     }
 }
 public function setUp()
 {
     $className = 'eZSolrMultiCoreBase';
     if (!class_exists($className)) {
         $this->markTestSkipped("The class '{$className}' doesn't exist.");
     }
     parent::setUp();
 }
Example #15
0
 /**
  * Test case teardown
  * Restores the INI settings changed in setUp
  **/
 public function tearDown()
 {
     $ini = eZINI::instance('site.ini');
     $ini->setVariable('DatabaseSettings', 'DatabaseImplementation', $this->iniBackup['implementationBackup']);
     $ini->setVariable('DatabaseSettings', 'Server', $this->iniBackup['serverBackup']);
     $ini->setVariable('DatabaseSettings', 'Database', $this->iniBackup['databaseBackup']);
     parent::tearDown();
 }
 public function setUp()
 {
     // Enabled delayed indexing in order not to index support objects
     // ( the ones used for testing ezfSolrDocumentFieldObjectRelation::getData() for instance )
     $siteINI = eZINI::instance('site.ini');
     $siteINI->setVariable('SearchSettings', 'DelayedIndexing', 'enabled');
     parent::setUp();
 }
 protected function setUp()
 {
     if (ezpTestRunner::dsn()->dbsyntax !== "postgresql") {
         self::markTestSkipped("Not running PostgresSQL, skipping");
     }
     parent::setUp();
     ezpTestDatabaseHelper::clean($this->sharedFixture);
 }
 public function tearDown()
 {
     if ($this->object !== null) {
         $this->destroyObject();
     }
     eZContentClassOperations::remove($this->class->id);
     parent::tearDown();
 }
 public function setUp()
 {
     parent::setUp();
     $imageClass = new ezpClass(self::CLASS_IDENTIFIER, self::CLASS_IDENTIFIER, "<name>");
     $imageClass->add("Name", "name", "ezstring");
     $imageClass->add("Image", "image", "ezimage");
     $imageClass->store();
 }
Example #20
0
 protected function setUp()
 {
     if (!in_array(ezpTestRunner::dsn()->dbsyntax, array('mysql', 'mysqli'))) {
         self::markTestSkipped("Not running MySQL nor MysQLi, skipping");
     }
     parent::setUp();
     // clean up the database so that the tests are independant from the ezp database
     ezpTestDatabaseHelper::clean($this->sharedFixture);
 }
Example #21
0
 public function tearDown()
 {
     $this->solrSearch->removeObject($this->object->object);
     $this->object->remove();
     $this->object = null;
     $this->solrSearch = null;
     ezpINIHelper::restoreINISettings();
     parent::tearDown();
 }
Example #22
0
 public function tearDown()
 {
     $this->fileAttribute = null;
     $this->imageObject->remove();
     $this->imageObject = null;
     eZContentClassOperations::remove($this->imageClass->id);
     $this->imageClass = null;
     parent::tearDown();
 }
 public function tearDown()
 {
     // Remove trigger
     eZTrigger::removeTriggerForWorkflow($this->workflow->attribute('id'));
     // Log in as whoever was logged in
     eZUser::setCurrentlyLoggedInUser($this->currentUser, $this->currentUser->attribute('id'));
     // Important that the parent method is run AFTER changes are done to the database.
     parent::tearDown();
 }
 public function tearDown()
 {
     if ($this->language instanceof eZContentLanguage) {
         if (!$this->language->removeThis()) {
             trigger_error('Could not remove language nor-NO, probably still existing content / class in this language!');
         }
     }
     parent::tearDown();
 }
 public function __construct()
 {
     parent::__construct();
     if (self::SORT_MODE === 'mtime') {
         // Sort by modification time to get updated tests first
         usort($this->files, array($this, 'sortTestsByMtime'));
     } else {
         // Sort it, then the file a.in will be processed first. Handy for development.
         usort($this->files, array($this, 'sortTestsByName'));
     }
 }
 public function tearDown()
 {
     $this->folder->remove();
     $this->article->remove();
     eZPendingActions::removeByAction('index_object');
     $this->nodeIds = array();
     $this->objectIds = array();
     $anonymousUser = eZUser::fetchByName('anonymous');
     eZUser::setCurrentlyLoggedInUser($anonymousUser, $anonymousUser->attribute('contentobject_id'));
     eZContentLanguage::expireCache();
     parent::tearDown();
 }
 public function tearDown()
 {
     $nor = eZContentLanguage::fetchByLocale('nno-NO');
     $dan = eZContentLanguage::fetchByLocale('dan-DK');
     if ($nor) {
         $nor->removeThis();
     }
     if ($dan) {
         $dan->removeThis();
     }
     parent::tearDown();
 }
 /**
  * Setup an environment for this test.
  *
  */
 public function setUp()
 {
     parent::setUp();
     // Create a class 1
     $class1 = new ezpClass('Test 1', 'test_1', '<name>');
     $class1->add('Name', 'name');
     $class1->add('Relations', 'relations', 'ezobjectrelationlist');
     $class1->store();
     // Generate class*.php cache files;
     eZContentClass::classIDByIdentifier('test_1');
     // Wait 3 seconds to get the proper timestamps for test
     sleep(3);
     // Create a class 2
     // It marks class-identifier-cache as expired because a new class has been created
     $class2 = new ezpClass('Test 2', 'test_2', '<name>');
     $class2->add('Name', 'name');
     $class2->add('Relations', 'relations', 'ezobjectrelationlist');
     $class2->store();
 }
 public function __construct()
 {
     parent::__construct();
     $this->setName( "eZContentObjectTreeNode Regression Tests" );
 }
 public function setUp()
 {
     parent::setUp();
     ezpTestDatabaseHelper::insertSqlData($this->sharedFixture, $this->sqlFiles);
 }