本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Test\WebTestCase::assertGreaterThan方法的典型用法代码示例。如果您正苦于以下问题:PHP WebTestCase::assertGreaterThan方法的具体用法?PHP WebTestCase::assertGreaterThan怎么用?PHP WebTestCase::assertGreaterThan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Bundle\FrameworkBundle\Test\WebTestCase
的用法示例。
在下文中一共展示了WebTestCase::assertGreaterThan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: shouldPrecedeForTheQuery
/**
*
* @Then /^"([^"]*)" should precede "([^"]*)" for the query "([^"]*)"$/
*/
public function shouldPrecedeForTheQuery($textBefore, $textAfter, $cssQuery)
{
// http://neverstopbuilding.net/simple-method-for-checking-for-order-with-behat/
$items = array_map(function ($element) {
return $element->getText();
}, $this->getPage()->findAll('css', $cssQuery));
WebTestCase::assertTrue(in_array($textBefore, $items), 'The before text was not found!');
WebTestCase::assertTrue(in_array($textAfter, $items), 'The after text was not found!');
WebTestCase::assertGreaterThan(array_search($textBefore, $items), array_search($textAfter, $items), "{$textBefore} does not proceed {$textAfter}");
}