本文整理汇总了PHP中LimeTest::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP LimeTest::__construct方法的具体用法?PHP LimeTest::__construct怎么用?PHP LimeTest::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LimeTest
的用法示例。
在下文中一共展示了LimeTest::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($plan = null, $options = array())
{
// for BC
if (!is_array($options)) {
$options = array();
// drop the old output because it is not compatible with LimeTest
}
parent::__construct($plan, $options);
}
示例2: __construct
public function __construct($plan = null, array $options = array())
{
parent::__construct($plan, $options);
$this->testRunner = new LimeTestRunner($this->getOutput());
$this->testRunner->addBefore(array($this, 'setUp'));
$this->testRunner->addAfter(array($this, 'tearDown'));
// attention: the following lines are not tested
$this->testRunner->addExceptionHandler(array($this, 'handleException'));
$this->testRunner->addAfter(array($this, 'verifyException'));
foreach (get_class_methods($this) as $method) {
if (strpos($method, 'test') === 0 && strlen($method) > 4) {
$this->testRunner->addTest(array($this, $method), $this->humanize($method));
}
}
}
示例3: __construct
public function __construct(LimeConfiguration $configuration = null)
{
parent::__construct($configuration);
$this->testRunner = new LimeTestRunner($this->getOutput());
$this->testRunner->addBefore(array($this, 'beginTest'));
$this->testRunner->addBefore(array($this, 'setUp'));
$this->testRunner->addAfter(array($this, 'tearDown'));
// attention: the following lines are not tested
$this->testRunner->addExceptionHandler(array($this, 'handleException'));
$this->testRunner->addAfter(array($this, 'endTest'));
$class = new ReflectionClass($this);
foreach ($class->getMethods() as $method) {
if (strpos($method->getName(), 'test') === 0 && strlen($method->getName()) > 4) {
$this->testRunner->addTest(array($this, $method->getName()), $this->humanize($method->getName()), $method->getFileName(), $method->getStartLine());
}
}
}
示例4: __construct
/**
* Constructor.
*/
public function __construct()
{
parent::__construct(0, array('output' => new LimeOutputNone()));
}
示例5: __construct
public function __construct($plan = null, $options = array())
{
// the options are dropped because they are not compatible anymore
parent::__construct($plan);
}