Skip to content

Commit 3ed7088

Browse files
authored
Merge pull request #56 from remicollet/issue-phpunit
Use modern phpunit
2 parents bda849d + 750fe47 commit 3ed7088

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ php:
77
- 5.6
88
- 7.0
99
- 7.1
10+
- nightly
1011
- hhvm
1112

13+
matrix:
14+
allow_failures:
15+
- php: hhvm
16+
1217
before_script:
1318
- composer install --no-interaction
1419

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"php": ">=5.3"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "4.*",
28+
"phpunit/phpunit": "^4.8.35|^5.7|^6.0",
2929
"squizlabs/php_codesniffer": "1.*"
3030
}
3131
}

tests/EnumTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @author Daniel Costa <danielcosta@gmail.com>
1212
* @author Mirosław Filip <mirfilip@gmail.com>
1313
*/
14-
class EnumTest extends \PHPUnit_Framework_TestCase
14+
class EnumTest extends \PHPUnit\Framework\TestCase
1515
{
1616
/**
1717
* getValue()
@@ -40,14 +40,11 @@ public function testGetKey()
4040

4141
/**
4242
* @dataProvider invalidValueProvider
43+
* @expectedException UnexpectedValueException
44+
* @expectedExceptionMessage is not part of the enum MyCLabs\Tests\Enum\EnumFixture
4345
*/
4446
public function testCreatingEnumWithInvalidValue($value)
4547
{
46-
$this->setExpectedException(
47-
'\UnexpectedValueException',
48-
'Value \'' . $value . '\' is not part of the enum MyCLabs\Tests\Enum\EnumFixture'
49-
);
50-
5148
new EnumFixture($value);
5249
}
5350

0 commit comments

Comments
 (0)