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 #12345

Closed
wants to merge 1 commit into
base: 3.x-dev
from

Conversation

Projects
None yet
3 participants
@carusogabriel

carusogabriel commented Dec 8, 2017

I've refactored several tests, using:

  • assertFileExists and assertFileNotExists instead of file_exists function;
  • assertArrayHasKey and assertArrayNotHasKey instead of isset and array_key_exists functions;
  • assertStringEqualsFile instead of file_get_contents function when comparing a string and a file;
  • assertFileEquals instead of file_get_contents function when comparing two files;
  • assertGreaterThan and assertLessThan for mathematical comparisons;
  • assertFalse and assertNotFalse instead of strict comparisons with false keyword;
  • assertTrue instead of strict comparisons with true keyword;
  • assertEmpty and assertNotEmpty instead of empty function;
  • assertInternalType instead of is_* functions;
  • assertEquals and assertNotEquals instead of comparisons;
  • assertSame and assertNotSame instead of comparisons;
  • assertContains instead of in_array and strpos functions;
  • assertCount instead of count and sizeof functions;
  • assertInstanceOf and assertNotInstanceOf instead of instanceof operator.
@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl

sgiehl Dec 10, 2017

Member

@carusogabriel thanks for the pull request. would you check why some tests are failing now? System and Integration tests should pass...

Member

sgiehl commented Dec 10, 2017

@carusogabriel thanks for the pull request. would you check why some tests are failing now? System and Integration tests should pass...

@mattab mattab added this to the 3.4.0 milestone Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment