8000 Refactoring tests by carusogabriel · Pull Request #2927 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Nov 28, 2017
Merged

Refactoring tests #2927

merged 1 commit into from
Nov 28, 2017

Conversation

carusogabriel
Copy link
Contributor
@carusogabriel carusogabriel commented Nov 27, 2017

I've refactored some tests with assertFileExists and assertFileNotExists methods.

Copy link
Member
@lcobucci lcobucci left a 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));
Copy link
Member

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));
Copy link
Member

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

@carusogabriel
Copy link
Contributor Author

@lcobucci I've changed your requested changes.

@lcobucci lcobucci added this to the 2.7.0 milestone Nov 28, 2017
@lcobucci lcobucci self-assigned this Nov 28, 2017
@lcobucci lcobucci merged commit a4d7acd into doctrine:master Nov 28, 2017
@lcobucci
Copy link
Member

@Gabriel-Caruso 🚢 thanks for your contribution!

@carusogabriel carusogabriel deleted the refactoring-tests branch November 28, 2017 15:47
@carusogabriel carusogabriel mentioned this pull request Dec 5, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0