/var/www/vhosts/nabawater/vendor/codeception/base/tests/unit/Codeception
NameSizeModeActions
Command/-0775rm
Constraints/-0775rm
Coverage/-0775rm
Exception/-0775rm
Lib/-0775rm
Module/-0775rm
Step/-0775rm
Subscriber/-0775rm
Test/-0775rm
Util/-0775rm
ApplicationTest.php7310664editdlrm
ConfigurationTest.php22030664editdlrm
ModuleTest.php8490664editdlrm
ScenarioTest.php12780664editdlrm
StepTest.php52390664editdlrm
SuiteManagerTest.php44840664editdlrm
TestLoaderTest.php33750664editdlrm
Edit: /var/www/vhosts/nabawater/vendor/codeception/base/tests/unit/Codeception/TestLoaderTest.php (3375B)
testLoader = new \Codeception\Test\Loader(['path' => \Codeception\Configuration::dataDir()]); } /** * @group core */ public function testAddCept() { $this->testLoader->loadTest('SimpleCept.php'); $this->assertCount(1, $this->testLoader->getTests()); } public function testAddTest() { $this->testLoader->loadTest('SimpleTest.php'); $this->assertCount(1, $this->testLoader->getTests()); } public function testAddCeptAbsolutePath() { $this->testLoader->loadTest(codecept_data_dir('SimpleCept.php')); $this->assertCount(1, $this->testLoader->getTests()); } public function testAddCeptWithoutExtension() { $this->testLoader->loadTest('SimpleCept'); $this->assertCount(1, $this->testLoader->getTests()); } /** * @group core */ public function testLoadFileWithFewCases() { $this->testLoader->loadTest('SimpleNamespacedTest.php'); $this->assertCount(3, $this->testLoader->getTests()); } /** * @group core */ public function testLoadAllTests() { // to autoload dependencies Codeception\Util\Autoload::addNamespace( 'Math', codecept_data_dir().'claypit/tests/_support/Math' ); Codeception\Util\Autoload::addNamespace('Codeception\Module', codecept_data_dir().'claypit/tests/_support'); $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); } protected function getTestNames($tests) { $testNames = []; foreach ($tests as $test) { $testNames[] = \Codeception\Test\Descriptor::getTestSignature($test); } return $testNames; } protected function assertContainsTestName($name, $testNames) { $this->assertContains($name, $testNames, "$name not found in tests"); } public function testDataProviderReturningArray() { $this->testLoader->loadTest('SimpleWithDataProviderArrayCest.php'); $tests = $this->testLoader->getTests(); /** @var \PHPUnit\Framework\DataProviderTestSuite $firstTest */ $firstTest = $tests[0]; $this->assertEquals(5, $firstTest->count()); } public function testDataProviderReturningGenerator() { $this->testLoader->loadTest('SimpleWithDataProviderYieldGeneratorCest.php'); $tests = $this->testLoader->getTests(); /** @var \PHPUnit\Framework\DataProviderTestSuite $firstTest */ $firstTest = $tests[0]; $this->assertEquals(5, $firstTest->count()); } }