本文整理汇总了PHP中WebGuy::dontSeeVisualChanges方法的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy::dontSeeVisualChanges方法的具体用法?PHP WebGuy::dontSeeVisualChanges怎么用?PHP WebGuy::dontSeeVisualChanges使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebGuy
的用法示例。
在下文中一共展示了WebGuy::dontSeeVisualChanges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dontSeeVisualChangesAndHideElement
public function dontSeeVisualChangesAndHideElement(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("hideTheBlock", "body", "#theblock");
$I->wait(1);
// the test has to be called twice for comparison on the travis server
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("hideTheBlock", "body", array("#theblock"));
}
示例2: writeCurrentImageFile
/**
* fail the test. lookup is current image is written
*/
public function writeCurrentImageFile(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("currentImageIdentifier", "#theblock");
$I->wait(2);
// the test has to be called twice for comparison on the travis server
// expect failing the test
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
try {
$I->dontSeeVisualChanges("currentImageIdentifier", "#theblock");
} catch (ImageDeviationException $exception) {
$currentImagePath = $exception->getCurrentImage();
if (!is_file($exception->getCurrentImage())) {
throw new \PHPUnit_Framework_ExpectationFailedException("The screenshot was not saved successfully.");
}
}
}