本文整理匯總了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}");
}