mageekguy\atoum\runner::addTest PHP Method

addTest() public method

public addTest ( $path )
    public function addTest($path)
    {
        if ($this->canAddTest === true) {
            $path = (string) $path;
            if (in_array($path, $this->testPaths) === false) {
                $this->testPaths[] = $path;
            }
        }
        return $this;
    }

Usage Example

示例#1
0
 public function testCanNotAddTest()
 {
     $this->if($runner = new testedClass())->then->object($runner->canNotAddTest())->isIdenticalTo($runner)->if($runner->addTest(uniqid()))->then->array($runner->getTestPaths())->isEmpty()->if($runner->canAddTest())->then->object($runner->canNotAddTest())->isIdenticalTo($runner)->if($runner->addTest(uniqid()))->then->array($runner->getTestPaths())->isEmpty();
 }
runner