本文整理汇总了PHP中PHP_CodeCoverage::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP PHP_CodeCoverage::clear方法的具体用法?PHP PHP_CodeCoverage::clear怎么用?PHP PHP_CodeCoverage::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHP_CodeCoverage
的用法示例。
在下文中一共展示了PHP_CodeCoverage::clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testClear
/**
* @covers PHP_CodeCoverage::clear
*/
public function testClear()
{
$this->coverage->clear();
$this->assertAttributeEquals(null, 'currentId', $this->coverage);
$this->assertAttributeEquals(array(), 'data', $this->coverage);
$this->assertAttributeEquals(array(), 'tests', $this->coverage);
}
示例2: testClear
/**
* @covers PHP_CodeCoverage::clear
*/
public function testClear()
{
$coverage = new PHP_CodeCoverage();
$coverage->clear();
$this->assertAttributeEquals(array(), 'data', $coverage);
$this->assertAttributeEquals(array(), 'coveredFiles', $coverage);
$this->assertAttributeEquals(array(), 'summary', $coverage);
$this->assertAttributeEquals(NULL, 'currentId', $coverage);
}
示例3: beforeExercise
/**
* Before Exercise hook
*
* @param \Behat\Testwork\EventDispatcher\Event\ExerciseCompleted $event
*/
public function beforeExercise(ExerciseCompleted $event)
{
$this->coverage->clear();
}