/** * @group core */ public function testCeptNamings() { $cept = new \Codeception\TestCase\Cept(); $cept->configName('LoginCept.php')->config('testFile', 'tests/acceptance/LoginCept.php'); $this->assertEquals('tests/acceptance/LoginCept.php', \Codeception\TestCase::getTestFileName($cept)); $this->assertEquals('tests/acceptance/LoginCept.php', \Codeception\TestCase::getTestFullName($cept)); $this->assertEquals('LoginCept', \Codeception\TestCase::getTestSignature($cept)); }
/** * @group core */ public function testCestNamings() { $cept = new \Codeception\TestCase\Cest(); $klass = new stdClass(); $cept->config('testClassInstance', $klass)->config('testMethod', 'user')->config('testFile', 'tests/acceptance/LoginCest.php'); $this->assertEquals('tests/acceptance/LoginCest.php:user', \Codeception\TestCase::getTestFullName($cept)); $this->assertEquals('tests/acceptance/LoginCest.php', \Codeception\TestCase::getTestFileName($cept)); $this->assertEquals('stdClass::user', \Codeception\TestCase::getTestSignature($cept)); }
public function _failed(\Codeception\TestCase $test, $fail) { $this->_saveScreenshot(codecept_log_dir(basename(\Codeception\TestCase::getTestFileName($test) . '.fail.png'))); $this->debug("Screenshot was saved into 'log' dir"); }