tolerant-php-parser icon indicating copy to clipboard operation
tolerant-php-parser copied to clipboard

Add comprehensive set of tests for API

Open mousetraps opened this issue 8 years ago • 2 comments
trafficstars

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 avatar Jan 20 '17 04:01 mousetraps

@mousetraps I'd be ready to write a few unit tests

decanus avatar Feb 03 '17 07:02 decanus

@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:.

mousetraps avatar Feb 03 '17 08:02 mousetraps