-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCH-3641: Add unit test to the Library #97
Conversation
5683cd5
to
a7e4cb9
Compare
93a0bef
to
859ca64
Compare
…ctions on it (dependency installation, run tests, etc.); add README.md to let the end-user know how to use it; add infection to evaluate tests quality
Initial overview of this looks good. Are we okay with the infection library not working on php 7.1 (failing tests error)? I believe @EclipseGc and @abarriosr may have additional thoughts around the code done here. |
You're right. As per Infection's composer.json, it needs |
composer.json
Outdated
"mockery/mockery": "^1.2" | ||
"mockery/mockery": "^1.2", | ||
"infection/infection": "^0.15.0", | ||
"ext-json": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency is added both as prod and dev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jose-oliveira Mockery has been there for a while, I didn't add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the ext-json one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Well, the harm is that we can't run tests on 7.1 with this dependency. If we aren't running Infection as part of our CI process, maybe we should require it in the make file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks ok, but we need to figure out what to do with PHP 7.1 tests failing due to incompatibility with Infection version.
That's right. I think we can safely remove infection for a while. |
…ion to makefile due to incampatibility with PHP version less than 7.3
@@ -80,11 +72,8 @@ protected static function propertiesMap() | |||
protected static function extractPropertyFromArray(string $propertyName, array $data, $default = '') | |||
{ | |||
$map = self::propertiesMap(); | |||
if (!isset($map[$propertyName])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed the removal of this bit. @cleancode4ever pointed out that it was overly paranoid, and that with the way the system is formulated he couldn't actually test it meaning there wasn't effectively a way to ever invoke it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing putEntities isn't going to work for us. It's postEntities() we never use. (also we don't use putEntity)
Fixed! |
infection
to gage the quality of the testsIf you want to run infection, you should install it first through
make install
command. For more information, please view the README.md fileOriginal ticket: https://backlog.acquia.com/browse/LCH-3641