/** * @group core */ public function testLoadAllTests() { $this->testLoader = new \Codeception\TestLoader(codecept_data_dir() . 'claypit/tests'); $this->testLoader->loadTests(); $this->assertContainsTestName('order/AnotherCept', $this->testLoader->getTests()); $this->assertContainsTestName('MageGuildCest::darkPower', $this->testLoader->getTests()); $this->assertContainsTestName('FailingTest::testMe', $this->testLoader->getTests()); }
public function loadTests($path = null) { $testLoader = new TestLoader($this->settings['path']); $path ? $testLoader->loadTest($path) : $testLoader->loadTests(); $tests = $testLoader->getTests(); foreach ($tests as $test) { $this->addToSuite($test); } }