tolerant-php-parser
tolerant-php-parser copied to clipboard
Add comprehensive set of tests for API
The API was somewhat haphazardly strewn together as an exploratory proof-of-concept, so it'll be good to start being more deliberate and increasing our test coverage in this area.
@mousetraps I'd be ready to write a few unit tests
@decanus sweet! A good place to start is any of the methods in Node.php or Token.php. Right now all the API tests are in NodeApiTests.php, which get run as part of the "api" testsuite. #82 is also open, which adds a test for GetFirstAncestor
At this point, the "intended" behavior for a lot of the methods is pretty loosely defined, so if you're not sure about what something should do, then just go with what you would prefer it to do :smiley:.