本文整理汇总了PHP中SimpleTestOptions::isIgnored方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleTestOptions::isIgnored方法的具体用法?PHP SimpleTestOptions::isIgnored怎么用?PHP SimpleTestOptions::isIgnored使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleTestOptions
的用法示例。
在下文中一共展示了SimpleTestOptions::isIgnored方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _createGroupFromClasses
function _createGroupFromClasses($title, $classes)
{
$group = new GroupTest($title);
foreach ($classes as $class) {
if (SimpleTestOptions::isIgnored($class)) {
continue;
}
$group->addTestClass($class);
}
return $group;
}
示例2: testIgnoreList
function testIgnoreList() {
$this->assertFalse(SimpleTestOptions::isIgnored('ImaginaryTestCase'));
SimpleTestOptions::ignore('ImaginaryTestCase');
$this->assertTrue(SimpleTestOptions::isIgnored('ImaginaryTestCase'));
}
示例3: _selectRunnableTests
/**
* Calculates the incoming test cases from a before
* and after list of loaded classes.
* @param array $existing_classes Classes before require().
* @param array $new_classes Classes after require().
* @return array New classes which are test
* cases that shouldn't be ignored.
* @access private
*/
function _selectRunnableTests($existing_classes, $new_classes)
{
$classes = array();
foreach ($new_classes as $class) {
if (in_array($class, $existing_classes)) {
continue;
}
if (!$this->_isTestCase($class)) {
continue;
}
if (SimpleTestOptions::isIgnored($class)) {
continue;
}
$classes[] = $class;
}
return $classes;
}
示例4: addTestFile
/**
* Builds a group test from a library of test cases.
* The new group is composed into this one.
* @param string $test_file File name of library with
* test case classes.
* @access public
*/
function addTestFile($test_file)
{
$existing_classes = get_declared_classes();
require $test_file;
$group = new GroupTest($test_file);
foreach (get_declared_classes() as $class) {
if (in_array($class, $existing_classes)) {
continue;
}
if (!$this->_isTestCase($class)) {
continue;
}
if (SimpleTestOptions::isIgnored($class)) {
continue;
}
$group->addTestCase(new $class());
}
$this->addTestCase($group);
}
示例5: _createGroupFromClasses
/**
* Builds a group test from a class list.
* @param string $title Title of new group.
* @param array $classes Test classes.
* @return GroupTest Group loaded with the new
* test cases.
* @access private
*/
function _createGroupFromClasses($title, $classes)
{
static $group;
if (!isset($group)) {
$group = new EclipseTest($title);
}
foreach ($classes as $class) {
if (SimpleTestOptions::isIgnored($class)) {
continue;
}
$tmpclass =& new $class();
if (is_subclass_of($tmpclass, "GroupTest")) {
$tmptestclasses = $tmpclass->_test_cases;
foreach ($tmptestclasses as $tmptestclass) {
$this->_createGroupFromClasses($title, $tmptestclass->_test_cases);
}
} else {
$group->addTestClass($class);
}
}
return $group;
}