Skip to content
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

Test enhancement #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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