class ElementHtmlException in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Exception/ElementHtmlException.php \Behat\Mink\Exception\ElementHtmlException
Exception thrown when an expectation on the HTML of an element fails.
@author Konstantin Kudryashov <ever.zet@gmail.com>
Hierarchy
- class \Behat\Mink\Exception\Exception
- class \Behat\Mink\Exception\Exception
- class \Behat\Mink\Exception\ExpectationException
- class \Behat\Mink\Exception\ElementHtmlException
- class \Behat\Mink\Exception\ExpectationException
- class \Behat\Mink\Exception\Exception
Expanded class hierarchy of ElementHtmlException
2 files declare their use of ElementHtmlException
- ElementHtmlExceptionTest.php in vendor/
behat/ mink/ tests/ Exception/ ElementHtmlExceptionTest.php - WebAssert.php in vendor/
behat/ mink/ src/ WebAssert.php
File
- vendor/
behat/ mink/ src/ Exception/ ElementHtmlException.php, line 22
Namespace
Behat\Mink\ExceptionView source
class ElementHtmlException extends ExpectationException {
/**
* Element instance.
*
* @var Element
*/
protected $element;
/**
* Initializes exception.
*
* @param string $message optional message
* @param DriverInterface|Session $driver driver instance
* @param Element $element element
* @param \Exception $exception expectation exception
*/
public function __construct($message, $driver, Element $element, \Exception $exception = null) {
$this->element = $element;
parent::__construct($message, $driver, $exception);
}
protected function getContext() {
return $this->element
->getOuterHtml();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ElementHtmlException:: |
protected | property | Element instance. | |
ElementHtmlException:: |
protected | function |
Gets the context rendered for this exception. Overrides ExpectationException:: |
1 |
ElementHtmlException:: |
public | function |
Initializes exception. Overrides ExpectationException:: |
|
ExpectationException:: |
private | property | ||
ExpectationException:: |
private | property | ||
ExpectationException:: |
protected | function | Returns driver. | |
ExpectationException:: |
protected | function | Returns response information string. | |
ExpectationException:: |
protected | function | Returns exception session. | |
ExpectationException:: |
protected | function | Prepends every line in a string with pipe (|). | |
ExpectationException:: |
protected | function | Removes response header/footer, letting only <body /> content. | |
ExpectationException:: |
protected | function | Trims string to specified number of chars. | |
ExpectationException:: |
public | function | Returns exception message with additional context info. |