当前位置: 首页>>代码示例>>PHP>>正文


PHP ezpDatabaseTestCase::setUp方法代码示例

本文整理汇总了PHP中ezpDatabaseTestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP ezpDatabaseTestCase::setUp方法的具体用法?PHP ezpDatabaseTestCase::setUp怎么用?PHP ezpDatabaseTestCase::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ezpDatabaseTestCase的用法示例。


在下文中一共展示了ezpDatabaseTestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * Test case setup
  */
 public function setUp()
 {
     parent::setUp();
     $this->wildcard = new eZURLWildcard(array('source_url' => 'MyRootURL', 'destination_url' => '/', 'type' => eZURLWildcard::TYPE_DIRECT));
     $this->wildcard->store();
     eZURLWildcard::expireCache();
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:10,代码来源:ezurlwildcard_regression.php

示例2: setUp

 /**
  * Test setup
  *
  * Load an instance of file.ini
  * Assigns DB parameters for cluster
  **/
 public function setUp()
 {
     if (!$this->sharedFixture instanceof eZMySQLDB) {
         self::markTestSkipped("Not using mysql interface, skipping");
     }
     parent::setUp();
     // We need to clear the existing handler if it was loaded before the INI
     // settings changes
     if (isset($GLOBALS['eZClusterFileHandler_chosen_handler']) and !$GLOBALS['eZClusterFileHandler_chosen_handler'] instanceof eZDFSFileHandler) {
         unset($GLOBALS['eZClusterFileHandler_chosen_handler']);
     }
     // Load database parameters for cluster
     // The same DSN than the relational database is used
     $fileINI = eZINI::instance('file.ini');
     $this->previousFileHandler = $fileINI->variable('ClusteringSettings', 'FileHandler');
     $fileINI->setVariable('ClusteringSettings', 'FileHandler', 'eZDFSFileHandler');
     $dsn = ezpTestRunner::dsn()->parts;
     $fileINI->setVariable('eZDFSClusteringSettings', 'DBHost', $dsn['host']);
     $fileINI->setVariable('eZDFSClusteringSettings', 'DBPort', $dsn['port']);
     $fileINI->setVariable('eZDFSClusteringSettings', 'DBSocket', $dsn['socket']);
     $fileINI->setVariable('eZDFSClusteringSettings', 'DBName', $dsn['database']);
     $fileINI->setVariable('eZDFSClusteringSettings', 'DBUser', $dsn['user']);
     $fileINI->setVariable('eZDFSClusteringSettings', 'DBPassword', $dsn['password']);
     $fileINI->setVariable('eZDFSClusteringSettings', 'MountPointPath', $this->DFSPath);
     if (!file_exists($this->DFSPath)) {
         eZDir::doMkdir($this->DFSPath, 0755);
         $this->haveToRemoveDFSPath = true;
     }
     ezpTestDatabaseHelper::insertSqlData($this->sharedFixture, $this->sqlFiles);
     $this->db = $this->sharedFixture;
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:37,代码来源:ezdfsfilehandler_test.php

示例3: setUp

 protected function setUp()
 {
     if (!in_array(ezpTestRunner::dsn()->dbsyntax, array('mysql', 'mysqli'))) {
         self::markTestSkipped("Not running MySQL nor MysQLi, skipping");
     }
     parent::setUp();
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:7,代码来源:ezmysqldb_fk_test.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->xxx = eZContentLanguage::addLanguage('xxx-XX', 'XXXX');
     ezpINIHelper::setINISetting('site.ini', 'RegionalSettings', 'SiteLanguageList', array('xxx-XX', 'eng-GB'));
     eZContentLanguage::clearPrioritizedLanguages();
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:7,代码来源:ezobjectrelationlist_regression.php

示例5: setUp

    /**
     * Test case setup
     * Changes INI settings that affect eZURLWildcard to known and predictable
     * values
     */
    public function setUp()
    {
        parent::setUp();

        $this->wildcardRow[0] = array(
            'source_url' => 'test/*',
            'destination_url' => '/',
            'type' => eZURLWildcard::TYPE_DIRECT,
        );

        $this->wildcards[0] = new eZURLWildcard( $this->wildcardRow[0] );

        $this->generatedWildcards = 5;

        // Creating some wildcards
        for ( $i = 0; $i < $this->generatedWildcards; ++$i )
        {
            $source = "test" . ( $i % 2 ? 'Odd' : 'Pair' ) . "/$i/*";
            $this->wildcardObjects[$source] = self::createWildcard( $source, '/', eZURLWildcard::TYPE_DIRECT );
        }

        // Creating some wildcards which will be used for translate tests
        $this->wildcardObjects["foobar/*/*"] = self::createWildcard( "foobar/*/*", '/', eZURLWildcard::TYPE_DIRECT );
        $this->wildcardObjects["testTranslate1/*/*"] = self::createWildcard( "testTranslate1/*/*", 'foobar/{1}/{2}', eZURLWildcard::TYPE_DIRECT );
        $this->wildcardObjects["testTranslate2/*/abc"] = self::createWildcard( "testTranslate2/*/abc", 'foobar/{1}', eZURLWildcard::TYPE_FORWARD );
        $this->wildcardObjects["test/single-page"] = self::createWildcard( "test/single-page", 'foo/bar', eZURLWildcard::TYPE_FORWARD );
        eZURLWildcard::expireCache();
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:33,代码来源:ezurlwildcard_test.php

示例6: setUp

    public function setUp()
    {
        parent::setUp();

        $this->userLogin = uniqid( '', true );
        $this->userEmail = "{$this->userLogin}@ez.no";

        $ini = eZINI::instance();
        $params = array(
            'creator_id' => 14,
            'class_identifier' => 'user',
            'parent_node_id' => $ini->variable( 'UserSettings', 'DefaultUserPlacement' ),
            'attributes' => array(
                'first_name' => 'foo',
                'last_name' => 'bar' ),
        );

        $contentObject = eZContentFunctions::createAndPublishObject( $params );

        if( !$contentObject instanceof eZContentObject )
        {
            die( 'Impossible to create user object' );
        }

        $this->userObject = $contentObject;
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:26,代码来源:ezusertype_regression.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     self::$qb = new ezfeZPSolrQueryBuilderTester();
     self::$findINI = eZINI::instance('ezfind.ini');
     self::$siteINI = eZINI::instance('site.ini');
 }
开发者ID:kevindejour,项目名称:ezfind,代码行数:7,代码来源:ezfezpsolrquerybuilder_test.php

示例8: setUp

 public function setUp()
 {
     $className = 'eZSolrMultiCoreBase';
     if (!class_exists($className)) {
         $this->markTestSkipped("The class '{$className}' doesn't exist.");
     }
     parent::setUp();
 }
开发者ID:kevindejour,项目名称:ezfind,代码行数:8,代码来源:ezsolrmulticorebase_test.php

示例9: setUp

 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();
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:8,代码来源:ezfsolrdocumentfieldbase_test.php

示例10: setUp

 /**
  * setUp():
  * - creates a PAEX object for the admin user
  **/
 public function setUp()
 {
     parent::setUp();
     $this->paexTime = time();
     $row = array('contentobject_id' => 14, 'passwordvalidationregexp' => '', 'passwordlifetime' => 3, 'expirationnotification' => eZPaEx::NOT_DEFINED, 'password_last_updated' => $this->paexTime, 'updatechildren' => 0, 'expirationnotification_sent' => 0);
     $this->paex = new eZPaEx($row);
     $this->paexINI = eZINI::instance('mbpaex.ini');
 }
开发者ID:netbliss,项目名称:ezmbpaex,代码行数:12,代码来源:ezpaex_test.php

示例11: setUp

 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();
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:8,代码来源:ezcachetest.php

示例12: setUp

 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();
 }
开发者ID:rmiguel,项目名称:ezpublish,代码行数:8,代码来源:ezclusterfilehandler_abstract_test.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->language = eZContentLanguage::addLanguage("nor-NO", "Norsk");
     // Make sure all tests are done using utf-8 as charset
     $this->charset = $GLOBALS['eZTextCodecInternalCharsetReal'];
     $GLOBALS['eZTextCodecInternalCharsetReal'] = 'utf-8';
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:8,代码来源:urlaliasml_test.php

示例14: setUp

 protected function setUp()
 {
     if (ezpTestRunner::dsn()->dbsyntax !== "postgresql") {
         self::markTestSkipped("Not running PostgresSQL, skipping");
     }
     parent::setUp();
     ezpTestDatabaseHelper::clean($this->sharedFixture);
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:8,代码来源:ezpostgresqldb_test.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->article = new ezpObject("article", 2, eZUser::fetchByName('anonymous')->attribute('contentobject_id'));
     $this->article->title = "Article for " . __CLASS__;
     $this->article->publish();
     $this->article->addTranslation("nor-NO", array("title" => "Norsk title of article for " . __CLASS__));
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:8,代码来源:ezcontentobject_test2.php


注:本文中的ezpDatabaseTestCase::setUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。