22
33namespace s9e \RegexpBuilder \Tests ;
44
5- use PHPUnit_Framework_TestCase ;
5+ use PHPUnit \ Framework \ TestCase ;
66use s9e \RegexpBuilder \Input \Utf8 ;
77use s9e \RegexpBuilder \MetaCharacters ;
88
99/**
1010* @covers s9e\RegexpBuilder\MetaCharacters
1111*/
12- class MetaCharactersTest extends PHPUnit_Framework_TestCase
12+ class MetaCharactersTest extends TestCase
1313{
1414 protected function getMeta (array $ map = [])
1515 {
@@ -24,21 +24,19 @@ protected function getMeta(array $map = [])
2424
2525 /**
2626 * @testdox Using multiple chars as meta-character throws an exception
27- * @expectedException InvalidArgumentException
28- * @expectedExceptionMessage Meta-characters must be represented by exactly one character
2927 */
3028 public function testMultipleCharsException ()
3129 {
30+ $ this ->expectException ('InvalidArgumentException ' , 'Meta-characters must be represented by exactly one character ' );
3231 $ this ->getMeta (['xx ' => 'x ' ]);
3332 }
3433
3534 /**
3635 * @testdox Invalid expressions throw an exception
37- * @expectedException InvalidArgumentException
38- * @expectedExceptionMessage Invalid expression '+++'
3936 */
4037 public function testInvalidExceptionException ()
4138 {
39+ $ this ->expectException ('InvalidArgumentException ' , "Invalid expression '+++' " );
4240 $ this ->getMeta (['x ' => '+++ ' ]);
4341 }
4442
@@ -56,11 +54,10 @@ public function testGetExpression()
5654
5755 /**
5856 * @testdox getExpression() throws an exception on unknown meta values
59- * @expectedException InvalidArgumentException
60- * @expectedExceptionMessage Invalid meta value -1
6157 */
6258 public function testGetExpressionException ()
6359 {
60+ $ this ->expectException ('InvalidArgumentException ' , "Invalid meta value -1 " );
6461 $ this ->getMeta ([])->getExpression (-1 );
6562 }
6663
0 commit comments