本文整理汇总了PHP中Codeception\Util\Debug::pause方法的典型用法代码示例。如果您正苦于以下问题:PHP Debug::pause方法的具体用法?PHP Debug::pause怎么用?PHP Debug::pause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Codeception\Util\Debug
的用法示例。
在下文中一共展示了Debug::pause方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pauseExecution
/**
* Pauses test execution in debug mode.
* To proceed test press "ENTER" in console.
*
* This method is useful while writing tests, since it allows you to inspect the current page in the middle of a test case.
*/
public function pauseExecution()
{
Debug::pause();
}
示例2: seeFileFound
/**
* Checks if file exists in path.
* Opens a file when it's exists
*
* ``` php
* <?php
* $I->seeFileFound('UserModel.php','app/models');
* ?>
* ```
*
* @param $filename
* @param string $path
*/
public function seeFileFound($filename, $path = '')
{
if (file_exists($filename) and !$path) {
$this->openFile($filename);
$this->filepath = $filename;
$this->debug($filename);
\PHPUnit_Framework_Assert::assertFileExists($path . $filename);
return;
}
$path = $this->absolutizePath($path);
$this->debug($path);
if (!file_exists($path)) {
\PHPUnit_Framework_Assert::fail("Directory does not exist: {$path}");
}
$files = Finder::create()->files()->name($filename)->in($path);
foreach ($files as $file) {
$file = $file->getRealPath();
$this->openFile($file);
$this->filepath = $file;
$this->debug($file);
\PHPUnit_Framework_Assert::assertFileExists($file);
return;
}
\Codeception\Util\Debug::pause();
$this->fail("{$filename} in {$path}");
}