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


PHP PHPUnit_Extensions_Database_TestCase类代码示例

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


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

示例1: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $this->conn->close();
     $this->conn = null;
     self::$pdo = null;
 }
开发者ID:gmo,项目名称:database,代码行数:7,代码来源:AbstractDatabaseTestCase.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     if ($this->__debug) {
         echo __METHOD__ . "\n";
     }
 }
开发者ID:jinguanio,项目名称:david,代码行数:7,代码来源:MySqlTest.php

示例3: setUp

 /**
  * @covers bankaccount\mapper\BankAccount::__construct
  */
 protected function setUp()
 {
     $this->db = new \PDO('sqlite::memory:');
     $this->mapper = new BankAccountMapper($this->db);
     $this->db->exec(file_get_contents(__DIR__ . '/../../../../database/bankaccount.sql'));
     parent::setUp();
 }
开发者ID:elan4u,项目名称:bank,代码行数:10,代码来源:BankAccountMapperTest.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $container = getContainer();
     self::$databaseDumper = $container->get('dumper.database.mysql');
     self::$shellExecutor = $container->get('helper.shell_executor');
 }
开发者ID:Viscaweb,项目名称:EasyBackups,代码行数:7,代码来源:MySQLDatabaseDumperTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     // DbEntityHelper::truncateDatabase(self::$propelCon);
     \Tbmt\SystemSetup::setCon(self::$propelCon);
     \Tbmt\SystemSetup::doSetupUnitTests();
 }
开发者ID:nikonehauser,项目名称:ptclient,代码行数:7,代码来源:Tbmt_Tests_DatabaseTestCase.php

示例6: setUp

 protected function setUp()
 {
     if (!extension_loaded('pdo_sqlite')) {
         $this->markTestSkipped('PDO/SQLite is required to run this test.');
     }
     parent::setUp();
 }
开发者ID:reflectivedevelopment,项目名称:jfh-lib,代码行数:7,代码来源:OperationsTest.php

示例7: setUp

 protected function setUp()
 {
     if (defined('DB_NOT_AVAILABLE')) {
         $this->markTestSkipped();
     }
     parent::setUp();
 }
开发者ID:nibra,项目名称:joomla-platform,代码行数:7,代码来源:JoomlaDatabaseTestCase.php

示例8: setup

 public function setup()
 {
     parent::setUp();
     // Establish a local reference to the Slim app object
     $this->app = $this->getSlimInstance();
     $this->client = new WebTestClient($this->app);
 }
开发者ID:there4,项目名称:slim-test-helpers,代码行数:7,代码来源:WebDbTestCase.php

示例9: setUp

 public function setUp()
 {
     $this->pdo = new \PDO('sqlite::memory:');
     $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
     $this->pdo->prepare("CREATE TABLE IF NOT EXISTS 'guestbook' (id int, content text, user text, created datetime)")->execute();
     parent::setUp();
 }
开发者ID:isidromerayo,项目名称:simple_php_skeleton,代码行数:7,代码来源:MyGuestbookTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $conn = $this->getConnection()->getConnection();
     $conn->exec("drop database lib_migration_test;");
     $conn->exec("create database lib_migration_test;");
 }
开发者ID:kohkimakimoto,项目名称:lib-migration,代码行数:7,代码来源:MigrationTest.php

示例11: setUp

 /**
  * Filling the config object with individual testcase data.
  */
 protected function setUp()
 {
     $dbFactory = new Factory();
     if (!isset($this->db)) {
         Registry::remove('db');
         $config = $this->getConfig();
         $this->db = $dbFactory->getInstanceByConfig($config);
         Registry::set('db', $this->db);
     }
     if ($this->db === false) {
         $this->markTestIncomplete('Necessary DB configuration is not set.');
         parent::setUp();
         return;
     }
     /*
      * Deleting all tables from the db and setting up the db using the given schema.
      */
     $sql = 'SHOW TABLES';
     $tableList = $this->db->queryList($sql);
     foreach ($tableList as $table) {
         $sql = 'DROP TABLE ' . $table;
         $this->db->query($sql);
     }
     $this->db->queryMulti($this->getSchemaSQLQueries());
     parent::setUp();
 }
开发者ID:prepare4battle,项目名称:Ilch-2.0,代码行数:29,代码来源:DatabaseTestCase.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     if ($this->isUsingSqlite()) {
         $this->resetSqliteAutoincrement();
     }
 }
开发者ID:molnapps,项目名称:database,代码行数:7,代码来源:DbTestCase.php

示例13: 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

示例14: 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

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     if (is_null($this->app)) {
         $this->app = $this->getApplication();
     }
 }
开发者ID:francescocambi,项目名称:FCMS2,代码行数:7,代码来源:SilexAppTestCase.php


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