Skip to content

Conversation

@carusogabriel
Copy link
Contributor

Description

Using dedicated PHPUnit assertions, we can get better error messages when debugging errors, for example:

-$this->assertTrue($xpath->query('/html/body/p[1]/ins')->length == 1); // Failing asserting that true is false
+$this->assertEquals(1, $xpath->query('/html/body/p[1]/ins')->length); // Failing asserting that variables is equal to 1

Fixes: -

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.838% when pulling 663fb03 on carusogabriel:phpunit into 49eb9d1 on PHPOffice:develop.

@troosan troosan merged commit d9165f0 into PHPOffice:develop Nov 30, 2018
@carusogabriel carusogabriel deleted the phpunit branch November 30, 2018 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants