public function isIgnored(array $namespaces = array(), array $tags = array())
{
$isIgnored = sizeof($this) <= 0 || $this->ignore === true;
if ($isIgnored === false && sizeof($namespaces) > 0) {
$classNamespace = strtolower($this->getClassNamespace());
$isIgnored = sizeof(array_filter($namespaces, function ($value) use($classNamespace) {
return strpos($classNamespace, strtolower($value)) === 0;
})) <= 0;
}
if ($isIgnored === false && sizeof($tags) > 0) {
$isIgnored = sizeof($testTags = $this->getAllTags()) <= 0 || sizeof(array_intersect($tags, $testTags)) == 0;
}
return $isIgnored;
}
public static function isIgnored(test $test, array $namespaces, array $tags) { $isIgnored = $test->isIgnored(); if ($isIgnored === false && $namespaces) { $classNamespace = strtolower($test->getClassNamespace()); $isIgnored = sizeof(array_filter($namespaces, function ($value) use($classNamespace) { return strpos($classNamespace, strtolower($value)) === 0; })) <= 0; } if ($isIgnored === false && $tags) { $isIgnored = sizeof($testTags = $test->getAllTags()) <= 0 || sizeof(array_intersect($tags, $testTags)) == 0; } return $isIgnored; }