Skip to content

Test enhancement#1

Open
peter279k wants to merge 1 commit into
pburggraf:masterfrom
open-source-contributions:test_enhancement
Open

Test enhancement#1
peter279k wants to merge 1 commit into
pburggraf:masterfrom
open-source-contributions:test_enhancement

Conversation

@peter279k

Copy link
Copy Markdown

Changed log

  • Since the php-5.6, php-7.0 and php-7.1 versions are going to be inactive. Using the php-7.2 version for this package at least.
  • Using the PHPUnit\Framework\TestCase namespace for upgrading PHPUnit 8.x version.
  • Upgrading the cached dependencies with composer update command.
  • Removing unused use syntax because this namespace is defined with use, but not used.
  • Removing additional white spaces because they're useless.

$this->assertEquals($validity, $result, sprintf('Tested plate: \'%s\', should be %s', $plate, (bool)$validity));
}

$this->assertGreaterThanOrEqual(0, count($validationResults));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On some test cases, $validationResults will be empty array and it will present This test did not perform any assertions during PHPUnit tests running.

To fix this issue, it should add this line to let all results can assert length is greater than or equal to 0.

$this->assertEquals($type, $result, sprintf('Tested plate: \'%s\', should be %s', $plate, $type));
}

$this->assertGreaterThanOrEqual(0, count($typeResults));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On some test cases, $typeResults will be empty array and it will present This test did not perform any assertions during PHPUnit tests running.

To fix this issue, it should add this line to let all results can assert length is greater than or equal to 0.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant