protected function visitClass(Node\Stmt\Class_ $class)
    {
        $this->testClass = false;

        $parent = $class->extends;

        if (empty($parent)) {
            // No ancestry
            // Treat the class as a test case class if the name
            // of the parent class ends with "TestCase".

            if (substr($class->name, -8) == 'TestCase') {
                $this->testClass = true;
            }
        } else {
            // Ancestry
            // Treat the class as a test case class if the name
            // of the parent class equals to "PHPUnit_Framework_TestCase".

            if ((string) $parent === 'PHPUnit_Framework_TestCase') {
                $this->testClass = true;
            }
        }
    }
protected function visitClass(Node\Stmt\Class_ $class)
    {
        $this->testClass = false;

        $parent = $class->extends;

        if (empty($parent)) {
            // No ancestry
            // Treat the class as a test case class if the name
            // of the parent class ends with "TestCase".

            if (substr($class->name, -8) == 'TestCase') {
                $this->testClass = true;
            }
        } else {
            // Ancestry
            // Treat the class as a test case class if the name
            // of the parent class equals to "PHPUnit_Framework_TestCase".

            if ((string) $parent === 'PHPUnit_Framework_TestCase') {
                $this->testClass = true;
            }
        }
    }
protected function visitClass ( Node \ Stmt \ Class_ $ class ) { $ this -> testClass = false ; $ parent = $ class -> extends ; if ( empty ( $ parent ) ) { // No ancestry // Treat the class as a test case class if the name // of the parent class ends with "TestCase". if ( substr ( $ class -> name , - 8 ) == 'TestCase' ) { $ this -> testClass = true ; } } else { // Ancestry // Treat the class as a test case class if the name // of the parent class equals to "PHPUnit_Framework_TestCase". if ( ( string ) $ parent === 'PHPUnit_Framework_TestCase' ) { $ this -> testClass = true ; } } }
Visits a class node.

@param Node\Stmt\Class_ $class Represents a class in the namespace

@return void
Visits a class node .