本文整理匯總了PHP中Codeception\TestCase::getFileName方法的典型用法代碼示例。如果您正苦於以下問題:PHP TestCase::getFileName方法的具體用法?PHP TestCase::getFileName怎麽用?PHP TestCase::getFileName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Codeception\TestCase
的用法示例。
在下文中一共展示了TestCase::getFileName方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _failed
public function _failed(\Codeception\TestCase $test, $fail)
{
if (!$this->client || !$this->client->getInternalResponse()) {
return;
}
file_put_contents(\Codeception\Configuration::logDir() . basename($test->getFileName()) . '.page.debug.html', $this->client->getInternalResponse()->getContent());
}
示例2: _failed
public function _failed(\Codeception\TestCase $test, $error)
{
$this->_saveScreenshot(\Codeception\Configuration::logDir() . basename($test->getFileName()) . '.fail.png');
$this->debug("Screenshot was saved into 'log' dir");
$this->session->stop();
}
示例3: _failed
public function _failed(\Codeception\TestCase $test, $fail)
{
$output = \Codeception\Configuration::logDir() . DIRECTORY_SEPARATOR . basename($test->getFileName()) . '.page.debug.html';
file_put_contents($output, $this->browser->getResponse()->getContent());
}
示例4: _failed
public function _failed(\Codeception\TestCase $test, $fail)
{
$fileName = str_replace('::', '-', $test->getFileName());
file_put_contents(\Codeception\Configuration::logDir() . basename($fileName) . '.page.fail.html', $this->session->getPage()->getContent());
}
示例5: _failed
public function _failed(\Codeception\TestCase $test, $fail)
{
file_put_contents(\Codeception\Configuration::logDir() . basename($test->getFileName()) . '.page.debug.html', $this->session->getPage()->getContent());
}
示例6: _failed
public function _failed(\Codeception\TestCase $test, $error)
{
$this->session->getDriver()->getBrowser()->captureEntirePageScreenshot(\Codeception\Configuration::logDir() . basename($test->getFileName()) . '.debug.png', '');
$this->debug("Screenshot was saved into 'log' dir");
$this->session->stop();
}