Namshi\AB\Container::runTests PHP Method

runTests() public method

Convenient method to run all the tests registered with this container at once.
public runTests ( )
    public function runTests()
    {
        foreach ($this->getAll() as $test) {
            $test->getVariation();
        }
    }

Usage Example

Beispiel #1
0
 public function testYouCanRunAllTestsFromTheContainer()
 {
     $test1 = new Test(1, array(1));
     $test2 = new Test(2, array(1));
     $container = new Container(array($test1, $test2));
     $this->assertFalse($test1->hasRun());
     $this->assertFalse($test2->hasRun());
     $container->runTests();
     $this->assertTrue($test1->hasRun());
     $this->assertTrue($test2->hasRun());
 }