Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

[Tests] Add Definition Tests #168

Open
ddmler opened this issue Oct 4, 2016 · 9 comments
Open

[Tests] Add Definition Tests #168

ddmler opened this issue Oct 4, 2016 · 9 comments

Comments

@ddmler
Copy link
Collaborator

ddmler commented Oct 4, 2016

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.

@yyaremenko
Copy link

taking ClassDefinition tests

@yyaremenko
Copy link

hey @ddmler I've found some misprint in your test-related code - 'defiNTion' instead of 'defiNITion', so I'm fixing that as well

@yyaremenko
Copy link

@ddmler please consider updating phpunit to 5.*, as current "^4.8.26" version is way too out of date

@ddmler
Copy link
Collaborator Author

ddmler commented Oct 6, 2016

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

@ovr
Copy link
Owner

ovr commented Oct 6, 2016

@yyaremenko @ddmler
Don't forget that We support "php": ">=5.5" to run PHPSA

@yyaremenko
Copy link

@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)

@yyaremenko
Copy link

guys, please reply ASAP, I am blocked (can not proceed with writing tests)

@ddmler
Copy link
Collaborator Author

ddmler commented Oct 6, 2016

remove null for statement, we always give one. 👍

@yyaremenko
Copy link

@ddmler okay thanx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants