Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -0,0 +1,42 @@
<?php
namespace Behat\Mink\Tests\Exception;
use Behat\Mink\Exception\ElementException;
/**
* @group legacy
*/
class ElementExceptionTest extends \PHPUnit_Framework_TestCase
{
public function testMessage()
{
$exception = new ElementException($this->getElementMock(), new \Exception('Something went wrong'));
$expectedMessage = "Exception thrown by element XPath\nSomething went wrong";
$this->assertEquals($expectedMessage, $exception->getMessage());
$this->assertEquals($expectedMessage, (string) $exception);
}
public function testElement()
{
$element = $this->getElementMock();
$exception = new ElementException($element, new \Exception('Something went wrong'));
$this->assertSame($element, $exception->getElement());
}
private function getElementMock()
{
$mock = $this->getMockBuilder('Behat\Mink\Element\Element')
->disableOriginalConstructor()
->getMock();
$mock->expects($this->any())
->method('getXPath')
->will($this->returnValue('element XPath'));
return $mock;
}
}