public function WebAssertTest::testFieldValueNotEquals in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testFieldValueNotEquals()
File
- vendor/
behat/ mink/ tests/ WebAssertTest.php, line 1152
Class
Namespace
Behat\Mink\TestsCode
public function testFieldValueNotEquals() {
$page = $this
->getMockBuilder('Behat\\Mink\\Element\\DocumentElement')
->disableOriginalConstructor()
->getMock();
$element = $this
->getMockBuilder('Behat\\Mink\\Element\\NodeElement')
->disableOriginalConstructor()
->getMock();
$this->session
->expects($this
->exactly(4))
->method('getPage')
->will($this
->returnValue($page));
$page
->expects($this
->exactly(4))
->method('findField')
->with('username')
->will($this
->returnValue($element));
$element
->expects($this
->exactly(4))
->method('getValue')
->will($this
->returnValue(235));
$this
->assertCorrectAssertion('fieldValueNotEquals', array(
'username',
234,
));
$this
->assertWrongAssertion('fieldValueNotEquals', array(
'username',
235,
), 'Behat\\Mink\\Exception\\ExpectationException', 'The field "username" value is "235", but it should not be.');
$this
->assertCorrectAssertion('fieldValueNotEquals', array(
'username',
23,
));
$this
->assertCorrectAssertion('fieldValueNotEquals', array(
'username',
'',
));
}