-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Refactoring tests #2927
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
Refactoring tests #2927
Conversation
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.
Just some minor nitpicks 😄
@@ -43,12 +43,12 @@ public function testReturnsSQLDeclaration() | |||
|
|||
public function testJsonNullConvertsToPHPValue() | |||
{ | |||
self::assertSame(array(), $this->type->convertToPHPValue(null, $this->platform)); | |||
self::assertEmpty($this->type->convertToPHPValue(null, $this->platform)); |
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.
self::assertSame()
must be kept here since Type#convertToPHPValue()
has a mixed
return and we must ensure that it's an array with no entry (not only something empty).
} | ||
|
||
public function testJsonEmptyStringConvertsToPHPValue() | ||
{ | ||
self::assertSame(array(), $this->type->convertToPHPValue('', $this->platform)); | ||
self::assertEmpty($this->type->convertToPHPValue('', $this->platform)); |
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.
self::assertSame()
must be kept here since Type#convertToPHPValue()
has a mixed
return and we must ensure that it's an array with no entry (not only something empty).
@lcobucci I've changed your requested changes. |
I've refactored some tests with
assertFileExists
andassertFileNotExists
methods.