Created
October 20, 2014 11:37
-
-
Save jameshd/934d4c69e9331b391f49 to your computer and use it in GitHub Desktop.
autofixtures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage within a test | |
$autoFixture->setXml('/path/to/xml') | |
->setExpectations( | |
array( | |
1 => array('longName' => 'Lewis Hamilton'), | |
2 => array('shortName' => 'L Hmltn'), | |
3 => array('videCode' => 'LHTN') | |
// etc... | |
) | |
) | |
$this->assertTrue($autoFixture->test()); | |
under the hood the autoFixture could do xpath thusly... | |
//[1]/@longName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment