Skip to content

Use modern phpunit #56

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

Merged
merged 2 commits into from
Jun 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ php:
- 5.6
- 7.0
- 7.1
- nightly
- hhvm

matrix:
allow_failures:
- php: hhvm
Copy link
Member

Choose a reason for hiding this comment

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

That change means that HHVM is no longer supported, is there a reason for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it fails ;)
And lot of projects slowly drop support for it (including Symfony which is in the dep tree)


before_script:
- composer install --no-interaction

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"phpunit/phpunit": "^4.8.35|^5.7|^6.0",
"squizlabs/php_codesniffer": "1.*"
}
}
9 changes: 3 additions & 6 deletions tests/EnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @author Daniel Costa <[email protected]>
* @author Mirosław Filip <[email protected]>
*/
class EnumTest extends \PHPUnit_Framework_TestCase
class EnumTest extends \PHPUnit\Framework\TestCase
{
/**
* getValue()
Expand Down Expand Up @@ -40,14 +40,11 @@ public function testGetKey()

/**
* @dataProvider invalidValueProvider
* @expectedException UnexpectedValueException
* @expectedExceptionMessage is not part of the enum MyCLabs\Tests\Enum\EnumFixture
Copy link
Member

Choose a reason for hiding this comment

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

The test is not the same, the first part of the message is not tested anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, but didn't find any other way

*/
public function testCreatingEnumWithInvalidValue($value)
{
$this->setExpectedException(
'\UnexpectedValueException',
'Value \'' . $value . '\' is not part of the enum MyCLabs\Tests\Enum\EnumFixture'
);

new EnumFixture($value);
}

Expand Down