TestSuite::getSize PHP Méthode

getSize() public méthode

Number of contained test cases.
public getSize ( ) : integer
Résultat integer Total count of cases in the group.
    public function getSize()
    {
        $count = 0;
        foreach ($this->test_cases as $case) {
            if (is_string($case)) {
                if (!SimpleTest::isIgnored($case)) {
                    $count++;
                }
            } else {
                $count += $case->getSize();
            }
        }
        return $count;
    }

Usage Example

Exemple #1
0
 function testLoadIfIncluded()
 {
     $tests = new TestSuite();
     $tests->addFile(dirname(__FILE__) . '/support/test1.php');
     $this->assertEqual($tests->getSize(), 1);
 }