Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
50
vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php
vendored
Normal file
50
vendor/behat/mink/tests/Exception/ElementNotFoundExceptionTest.php
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace Behat\Mink\Tests\Exception;
|
||||
|
||||
use Behat\Mink\Exception\ElementNotFoundException;
|
||||
|
||||
class ElementNotFoundExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideExceptionMessage
|
||||
*/
|
||||
public function testBuildMessage($message, $type, $selector = null, $locator = null)
|
||||
{
|
||||
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
|
||||
|
||||
$exception = new ElementNotFoundException($driver, $type, $selector, $locator);
|
||||
|
||||
$this->assertEquals($message, $exception->getMessage());
|
||||
}
|
||||
|
||||
public function provideExceptionMessage()
|
||||
{
|
||||
return array(
|
||||
array('Tag not found.', null),
|
||||
array('Field not found.', 'field'),
|
||||
array('Tag matching locator "foobar" not found.', null, null, 'foobar'),
|
||||
array('Tag matching css "foobar" not found.', null, 'css', 'foobar'),
|
||||
array('Field matching xpath "foobar" not found.', 'Field', 'xpath', 'foobar'),
|
||||
array('Tag with name "foobar" not found.', null, 'name', 'foobar'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
*/
|
||||
public function testConstructWithSession()
|
||||
{
|
||||
$driver = $this->getMock('Behat\Mink\Driver\DriverInterface');
|
||||
$session = $this->getMockBuilder('Behat\Mink\Session')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$session->expects($this->any())
|
||||
->method('getDriver')
|
||||
->will($this->returnValue($driver));
|
||||
|
||||
$exception = new ElementNotFoundException($session);
|
||||
|
||||
$this->assertEquals('Tag not found.', $exception->getMessage());
|
||||
}
|
||||
}
|
Reference in a new issue