phpsa
phpsa copied to clipboard
[Tests] Add Definition Tests
We need tests for the definition directory. Currently we only have some for ClassDefinition and RuntimeClassDefinition but those are not complete too.
You don't have to do all, write here which of them you want to add.
taking ClassDefinition tests
hey @ddmler I've found some misprint in your test-related code - 'defiNTion' instead of 'defiNITion', so I'm fixing that as well
@ddmler please consider updating phpunit to 5.*, as current "^4.8.26" version is way too out of date
@yyaremenko 4.8 was a long term support version i think. the support ends february 2017. if you want make a PR that updates it, i don't know if we use any BC breaking stuff here.
@yyaremenko @ddmler
Don't forget that We support "php": ">=5.5"
to run PHPSA
@ddmler @ovr guys looks I've found a serious bug in the code while writing tests:
PHPSA\Definition\ClassDefinition constructor allows $statement to be of null type; in the other hand, complie() line 145 creates Event\StatementBeforeCompile instance which, in turn, does not allow null $statement
please advice - should I update the code and disallow null in constructor or should I do it some other way (I am not fully familiar with your code)
guys, please reply ASAP, I am blocked (can not proceed with writing tests)
remove null for statement, we always give one. :+1:
@ddmler okay thanx