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


PHP PHPUnit_Extensions_Database_TestCase::setUpBeforeClass方法代码示例

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


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

示例1: setUpBeforeClass

 /**
  * Set up tables
  */
 public static function setUpBeforeClass()
 {
     foreach (static::$_tables as $table) {
         \Library\Application::getService("Database\\Table\\{$table}")->setSchema();
     }
     parent::setUpBeforeClass();
 }
开发者ID:patrickpreuss,项目名称:Braintacle,代码行数:10,代码来源:AbstractTest.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     $database = \Library\Application::getService('Database\\Nada');
     $database->createTable('test1', array(array('name' => 'col1', 'type' => 'varchar', 'length' => 10, 'notnull' => true), array('name' => 'col2', 'type' => 'varchar', 'length' => 10, 'notnull' => true)), 'col1');
     $database->createTable('test2', array(array('name' => 'col1', 'type' => 'varchar', 'length' => 10, 'notnull' => true)), 'col1');
     parent::setUpBeforeClass();
 }
开发者ID:patrickpreuss,项目名称:Braintacle,代码行数:7,代码来源:AbstractTableTest.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     foreach (static::$_tables as $table) {
         static::$serviceManager->get("Database\\Table\\{$table}")->setSchema(true);
     }
     parent::setUpBeforeClass();
 }
开发者ID:hschletz,项目名称:braintacle,代码行数:7,代码来源:AbstractTest.php

示例4: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     /*
      * Configure the library with the DB connection
      */
     //        Config::setConnection(self::getPDO());
     parent::setUpBeforeClass();
 }
开发者ID:ptejada,项目名称:userid-permissions,代码行数:8,代码来源:Tests_Database_TestCase.php

示例5: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     global $phpbb_root_path, $phpEx;
     $setup_extensions = static::setup_extensions();
     $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx);
     $finder->core_path('phpbb/db/migration/data/');
     if (!empty($setup_extensions)) {
         $finder->set_extensions($setup_extensions)->extension_directory('/migrations');
     }
     $classes = $finder->get_classes();
     $schema_sha1 = sha1(serialize($classes));
     self::$schema_file = __DIR__ . '/../tmp/' . $schema_sha1 . '.json';
     self::$install_schema_file = __DIR__ . '/../../phpBB/install/schemas/schema.json';
     if (!file_exists(self::$schema_file)) {
         global $table_prefix;
         $db = new \phpbb\db\driver\sqlite();
         $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
         file_put_contents(self::$schema_file, json_encode($schema_generator->get_schema()));
     }
     copy(self::$schema_file, self::$install_schema_file);
     parent::setUpBeforeClass();
 }
开发者ID:Voxel37,项目名称:phpbb,代码行数:22,代码来源:phpbb_database_test_case.php

示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     if (!isset($GLOBALS['PDO_DSN']) || !isset($GLOBALS['PDO_USER']) || !isset($GLOBALS['PDO_PASS']) || !isset($GLOBALS['PDO_DBNAME'])) {
         // insufficient values to work with
         return;
     }
     $dsn = $GLOBALS['PDO_DSN'];
     static::$driver = substr($dsn, 0, strpos($dsn, ':'));
     static::$pdo = new \PDO($dsn, $GLOBALS['PDO_USER'], $GLOBALS['PDO_PASS']);
     // create files
     sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('flysystempdo-test-', true);
     $tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR;
     $emptyFilename = $tmpDir . uniqid('flysystempdo-test-00B-', true);
     $tenByteFilename = $tmpDir . uniqid('flysystempdo-test-10B-', true);
     $tenKayFilename = $tmpDir . uniqid('flysystempdo-test-10K-', true);
     $fifteenMegFilename = $tmpDir . uniqid('flysystempdo-test-15M-', true);
     static::fillFile($emptyFilename, 0);
     static::fillFile($tenByteFilename, 10);
     static::fillFile($tenKayFilename, 10 * 1024);
     static::fillFile($fifteenMegFilename, 15 * 1024 * 1024);
     static::$tempFiles = ['00B' => $emptyFilename, '10B' => $tenByteFilename, '10K' => $tenKayFilename, '15M' => $fifteenMegFilename];
 }
开发者ID:phlib,项目名称:flysystem-pdo,代码行数:23,代码来源:IntegrationTest.php

示例7: setUpBeforeClass

 /**
  * Provide table class and create table
  */
 public static function setUpBeforeClass()
 {
     static::$_table = \Library\Application::getService(static::_getClass());
     static::$_table->setSchema();
     parent::setUpBeforeClass();
 }
开发者ID:patrickpreuss,项目名称:Braintacle,代码行数:9,代码来源:AbstractTest.php

示例8: setUpBeforeClass

 /**
  * Provide table class and create table
  */
 public static function setUpBeforeClass()
 {
     static::$_table = static::$serviceManager->get(static::_getClass());
     static::$_table->setSchema(true);
     parent::setUpBeforeClass();
 }
开发者ID:hschletz,项目名称:braintacle,代码行数:9,代码来源:AbstractTest.php

示例9: setUpBeforeClass

 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing Site_CertStatusLogCascadeDeletionsTest. . .\n";
 }
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:9,代码来源:Site_CertStatusLogCascadeDeletionsTest.php

示例10: setUpBeforeClass

 /**
  * Setup config
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     TestHelper::setConfigInRegistry(static::$configData);
 }
开发者ID:prepare4battle,项目名称:Ilch-2.0,代码行数:8,代码来源:DatabaseTestCase.php


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