X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fbehat%2Fmink%2Fsrc%2FElement%2FDocumentElement.php;fp=vendor%2Fbehat%2Fmink%2Fsrc%2FElement%2FDocumentElement.php;h=c2daf6601febdaab4d3a3ba6ad479bcf94f0c46d;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/vendor/behat/mink/src/Element/DocumentElement.php b/vendor/behat/mink/src/Element/DocumentElement.php new file mode 100644 index 000000000..c2daf6601 --- /dev/null +++ b/vendor/behat/mink/src/Element/DocumentElement.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Behat\Mink\Element; + +/** + * Document element. + * + * @author Konstantin Kudryashov + */ +class DocumentElement extends TraversableElement +{ + /** + * Returns XPath for handled element. + * + * @return string + */ + public function getXpath() + { + return '//html'; + } + + /** + * Returns document content. + * + * @return string + */ + public function getContent() + { + return trim($this->getDriver()->getContent()); + } + + /** + * Check whether document has specified content. + * + * @param string $content + * + * @return Boolean + */ + public function hasContent($content) + { + return $this->has('named', array('content', $content)); + } +}