Skip to content

Conversation

peter279k
Copy link
Contributor

Changed log

  • Using current assertions to assert the expected and result values.
  • Removing additional white spaces.
  • To be consistency, using the use syntax to declare required namespaces on the beginning of PHP file.
  • Using the magic ::class syntax to assert instance is expected.
  • According to official PHPUnit doc, the setUp and tearDown fixture methods are protected, not public.

class_exists('\PHPUnit_Framework_TestCase')) {
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the PHPUnit uses the 6.4 version at least, the default PHPUnit namespace is PHPUnit\Framework\TestCase.

The class_alias and class checking are not necessary.

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