Skip to content

Commit

Permalink
Merge pull request #56 from remicollet/issue-phpunit
Browse files Browse the repository at this point in the history
Use modern phpunit
  • Loading branch information
mnapoli authored Jun 28, 2017
2 parents bda849d + 750fe47 commit 3ed7088
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
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

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 <danielcosta@gmail.com>
* @author Mirosław Filip <mirfilip@gmail.com>
*/
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
*/
public function testCreatingEnumWithInvalidValue($value)
{
$this->setExpectedException(
'\UnexpectedValueException',
'Value \'' . $value . '\' is not part of the enum MyCLabs\Tests\Enum\EnumFixture'
);

new EnumFixture($value);
}

Expand Down

0 comments on commit 3ed7088

Please sign in to comment.