PHP code example of tiny / xml-assertions
1. Go to this page and download the library: Download tiny/xml-assertions library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tiny / xml-assertions example snippets
/**
* Assert that xpath exists.
* @param string $xpath Xpath to search
* @param mixed $domNode DOMDocument or DOMElement instance as a start for search
* @param integer $count How many times xpath is expected to be found. Null if any.
* @param string $message Message to be displayed by PHPUnit on failure.
*/
public static function assertXpathExists($xpath, $domNode, $count = null, $message = '');
/**
*
* @param string $xpath Xpath where value is expected to be found
* @param mixed $value Expected value
* @param mixed $domNode DOMDocument or DOMElement instance as a start for search
* @param string $message Message to be displayed by PHPUnit on failure.
*/
public static function assertValueOnXpath($xpath, $value, $domNode, $message = '');