/** * @group core */ public function testLoadAllTests() { Codeception\Util\Autoload::addNamespace('Math', codecept_data_dir() . 'claypit/tests/_support/Math'); // to autoload dependencies $this->testLoader = new \Codeception\Test\Loader(['path' => codecept_data_dir() . 'claypit/tests']); $this->testLoader->loadTests(); $testNames = $this->getTestNames($this->testLoader->getTests()); $this->assertContainsTestName('AnotherCept', $testNames); $this->assertContainsTestName('MageGuildCest:darkPower', $testNames); $this->assertContainsTestName('FailingTest:testMe', $testNames); $this->assertContainsTestName('MathCest:testAddition', $testNames); $this->assertContainsTestName('MathTest:testAll', $testNames); }
public function loadTests($path = null) { $testLoader = new Loader($this->settings); $testLoader->loadTests($path); $tests = $testLoader->getTests(); if ($this->settings['shuffle']) { shuffle($tests); } foreach ($tests as $test) { $this->addToSuite($test); } $this->suite->reorderDependencies(); }