Skip to content

Commit 88460a8

Browse files
committed
use modern phpunit
1 parent 61f4a24 commit 88460a8

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

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)