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


PHP PHPUnit_Extensions_Database_TestCase::__construct方法代码示例

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


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

示例1: __construct

	public function __construct($name = NULL, array $data = array(), $dataName = '')
	{
		parent::__construct($name, $data, $dataName);
		$this->backupStaticAttributesBlacklist += array(
			'PHP_CodeCoverage' => array('instance'),
			'PHP_CodeCoverage_Filter' => array('instance'),
			'PHP_CodeCoverage_Util' => array('ignoredLines', 'templateMethods'),
			'PHP_Timer' => array('startTimes',),
			'PHP_Token_Stream' => array('customTokens'),
			'PHP_Token_Stream_CachingFactory' => array('cache'),

			'phpbb_database_test_case' => array('already_connected'),
		);
	}
开发者ID:naderman,项目名称:phpbb-orchestra,代码行数:14,代码来源:phpbb_database_test_case.php

示例2: PDO

 function __construct($db_index = NULL)
 {
     parent::__construct();
     $this->_core =& Vevui::get();
     $config = $this->_core->e->db;
     if (NULL === $db_index) {
         $db_config_value = $config->databases->{$config->default_schema};
     } else {
         $db_config_value = $config->databases->{$db_index};
     }
     // Only MySQL at the moment. mysql:dbname=testdb;host=127.0.0.1
     $dsn = $db_config_value->drv . ':dbname=' . $db_config_value->db . ';host=' . $db_config_value->host;
     self::$_pdo = new PDO($dsn, $db_config_value->user, $db_config_value->pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''));
     $this->_conn = $this->createDefaultDBConnection(self::$_pdo, $db_config_value->db);
 }
开发者ID:scalia,项目名称:Vevui,代码行数:15,代码来源:testdb_case.php

示例3: __construct

	/**
	 * Call parent constructor and initialize reference to CodeIgniter
	 * 
	 * @internal
	 */
	public function __construct($name = NULL, array $data = array(), $dataName = '')
    {
        parent::__construct($name, $data, $dataName);
		$this->CI =& get_instance();	
    }
开发者ID:hds-team,项目名称:HDS,代码行数:10,代码来源:CITest.php

示例4: __construct

 /**
  *  Constructor.
  *
  *  Because we are overriding the parent class constructor, we
  *  need to show the same arguments as exist in the constructor of
  *  PHPUnit_Framework_TestCase, since
  *  PHPUnit_Framework_TestSuite::createTest() creates a
  *  ReflectionClass of the Test class and checks the constructor
  *  of that class to decide how to set up the test.
  *
  * @param string $name
  * @param array $data
  * @param string $dataName
  */
 public function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     // we need full error reporting
     error_reporting(E_ALL & ~E_NOTICE);
     self::$_dbName = self::getDBName();
     // also load the class loader
     require_once 'CRM/Core/ClassLoader.php';
     CRM_Core_ClassLoader::singleton()->register();
     if (function_exists('_civix_phpunit_setUp')) {
         // FIXME: loosen coupling
         _civix_phpunit_setUp();
     }
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:28,代码来源:CiviUnitTestCase.php

示例5: __construct

 /**
  *  Constructor.
  *
  *  Because we are overriding the parent class constructor, we
  *  need to show the same arguments as exist in the constructor of
  *  PHPUnit_Framework_TestCase, since
  *  PHPUnit_Framework_TestSuite::createTest() creates a
  *  ReflectionClass of the Test class and checks the constructor
  *  of that class to decide how to set up the test.
  *
  * @param string $name
  * @param array $data
  * @param string $dataName
  */
 public function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     // we need full error reporting
     error_reporting(E_ALL & ~E_NOTICE);
     if (!empty($GLOBALS['mysql_db'])) {
         self::$_dbName = $GLOBALS['mysql_db'];
     } else {
         self::$_dbName = 'civicrm_tests_dev';
     }
     //  create test database
     self::$utils = new Utils($GLOBALS['mysql_host'], $GLOBALS['mysql_port'], $GLOBALS['mysql_user'], $GLOBALS['mysql_pass']);
     // also load the class loader
     require_once 'CRM/Core/ClassLoader.php';
     CRM_Core_ClassLoader::singleton()->register();
     if (function_exists('_civix_phpunit_setUp')) {
         // FIXME: loosen coupling
         _civix_phpunit_setUp();
     }
 }
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:34,代码来源:CiviUnitTestCase.php

示例6: __construct

 public function __construct($name = null, array $data = [], $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->bindConfig();
 }
开发者ID:artox-lab,项目名称:fairy-database,代码行数:5,代码来源:DbTestCase.php

示例7: __construct

 public function __construct($name = null, array $data = [], $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->pdo = $this->getPDO();
     $this->createTable($this->pdo);
 }
开发者ID:up1,项目名称:course_php_101,代码行数:6,代码来源:EmployeeTest.php

示例8: __construct

 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->db = new DB(self::getPDO());
 }
开发者ID:timetoogo,项目名称:pinq.demo.sql,代码行数:5,代码来源:RealPdoSqlTestCase.php

示例9: __construct

 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->pdo = $this->getPdo();
     BankAccount::createTable($this->pdo);
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:6,代码来源:BankAccountDBTest.php

示例10: __construct

 public function __construct($name = null, array $data = [], $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->pdo = ConnectionFactory::load()->getPdo();
     User::createTable($this->pdo);
 }
开发者ID:andela-oogunjimi,项目名称:Potato-ORM,代码行数:6,代码来源:UserTest.php

示例11: array

 /**
  *  Constructor
  *
  *  Because we are overriding the parent class constructor, we
  *  need to show the same arguments as exist in the constructor of
  *  PHPUnit_Framework_TestCase, since
  *  PHPUnit_Framework_TestSuite::createTest() creates a
  *  ReflectionClass of the Test class and checks the constructor
  *  of that class to decide how to set up the test.
  *
  *  @param  string $name
  *  @param  array  $data
  *  @param  string $dataName
  */
 function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:18,代码来源:CiviUnitTestCase.php

示例12: __construct

 public function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     $config = $this->getT4ConnectionConfig();
     $this->connection = new \Pdo('mysql:dbname=' . $config->dbname . ';host=' . $config->host . '', $config->user, $config->password);
     parent::__construct($name, $data, $dataName);
 }
开发者ID:pr-of-it,项目名称:t4,代码行数:6,代码来源:BaseTest.php

示例13: __construct

 /**
  * Class constructor
  *
  * @author Ronan Chilvers <ronan@d3r.com>
  */
 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->setUpFixtures();
 }
开发者ID:D3R,项目名称:phpunit-utils,代码行数:10,代码来源:TestCase.php


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