本文整理汇总了PHP中TestCase::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP TestCase::__construct方法的具体用法?PHP TestCase::__construct怎么用?PHP TestCase::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestCase
的用法示例。
在下文中一共展示了TestCase::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
*/
public function __construct($name, $url, $user, $pass)
{
parent::__construct($name);
$this->url = new URL($url);
$this->url->setUser($user);
$this->url->setPassword($pass);
}
示例2: __construct
public function __construct($name = null, $description = null, $id = null)
{
parent::__construct($name, $description, $id);
$this->m = new Mongo("mongodb://" . $this->dbuser . ":" . $this->dbpassword . "@localhost");
$this->db = $this->m->selectDB('bingo');
$this->doctrinemodel = \Utility\DoctrineConnect::GetInstance(__DIR__ . '/../../cache')->Doctrinemodel;
}
示例3: __construct
/**
* Constructor
*
* @param unittest.TestCase base
* @param var[] args
*/
public function __construct($base, $args)
{
$uniq = '';
foreach ((array) $args as $arg) {
$uniq .= ', ' . xp::stringOf($arg);
}
parent::__construct($base->getName() . '(' . substr($uniq, 2) . ')');
$this->base = $base;
}
示例4: __construct
/**
* MonitorRouterTest constructor.
*
* @param string $name Name of the test.
* @param array $data Data
* @param string $dataName Data name
*/
public function __construct($name = null, array $data = array(), $dataName = '')
{
JLoader::register('MonitorRouter', JPATH_ROOT . '/components/com_monitor/router.php');
JLoader::registerPrefix('MonitorTest', JPATH_ROOT . '/components/com_monitor/tests/unit', false, true);
class_exists('MonitorTestMockMenu');
class_exists('MonitorTestMockModelProject');
class_exists('MonitorTestMockModelIssue');
parent::__construct($name, $data, $dataName);
}
示例5: __construct
/**
* @param Adapter $adapter
* @param Extractor $annotationExtractor
* @param Generator $asserterGenerator
* @param Manager $assertionManager
* @param \Closure $reflectionClassFactory
* @param \Closure $phpExtensionFactory
* @param Analyzer $analyzer
*/
public function __construct(Adapter $adapter = null, Extractor $annotationExtractor = null, Generator $asserterGenerator = null, Manager $assertionManager = null, \Closure $reflectionClassFactory = null, \Closure $phpExtensionFactory = null, Analyzer $analyzer = null)
{
parent::__construct($adapter, $annotationExtractor, $asserterGenerator, $assertionManager, $reflectionClassFactory, $phpExtensionFactory, $analyzer);
$this->getAssertionManager()->setHandler('randomRepository', function ($size = null) {
return $this->randomRepository($size);
})->setHandler('emptyRepository', function () {
return $this->emptyRepository();
});
}
示例6: __construct
/**
* {@inheritdoc}
*/
public function __construct(Adapter $adapter = null, Extractor $annotationExtractor = null, Generator $asserterGenerator = null, Manager $assertionManager = null, \Closure $reflectionClassFactory = null)
{
parent::__construct($adapter, $annotationExtractor, $asserterGenerator, $assertionManager, $reflectionClassFactory);
$this->getAssertionManager()->setHandler('randomNativeValue', function () {
return $this->randomNativeValue();
})->setHandler('invalidNativeValue', function () {
return $this->invalidNativeValue();
})->setHandler('uniqueNativeValue', function () {
return $this->uniqueNativeValue();
})->setHandler('fromNative', function ($value) {
return $this->fromNative($value);
});
}
示例7: __construct
/**
* See http://stackoverflow.com/
* questions/26710631/laravel-framework-classes-not-available-in-phpunit-data-provider
* @param $name
* @param array $data
* @param $dataName
*/
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->createApplication();
}
示例8: __construct
public function __construct()
{
parent::__construct();
}
示例9: __construct
/**
* Constructs a test case with the given name.
*
* @param string $name
* @param array $data
* @param string $dataName
*/
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->build_path = __DIR__ . '/Fixtures/Blog';
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->model = 'Role';
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->username = 'nuwira';
$this->password = 'nuwira';
}
示例12: __construct
/**
* Constructor
*
* @param string name
* @param string uri
*/
public function __construct($name, $server, $port)
{
$this->server = $server;
$this->port = $port;
parent::__construct($name);
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->httpHeaderHelper = new HttpHeaderHelper();
}
示例14: __construct
public function __construct($name = null, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
}
示例15: __construct
public function __construct()
{
$this->faker = Factory::create();
parent::__construct();
}