Skip to content

Commit bb95429

Browse files
committed
PHPUnit 8 compatible
1 parent 733882f commit bb95429

22 files changed

+286
-230
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"require-dev": {
3030
"lunr/halo": "dev-master",
31-
"phpunit/phpunit": "~7.0",
31+
"phpunit/phpunit": "~8.0",
3232
"theseer/autoload": "~1.0",
3333
"phing/phing": "~2.0"
3434
},

composer.lock

Lines changed: 105 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PHPDraft/In/Tests/ApibFileParserTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ public function testFilenameSetup(): void
5454

5555
/**
5656
* Test if exception when the file doesn't exist
57-
* @expectedException \PHPDraft\Parse\ExecutionException
58-
* @expectedExceptionCode 1
59-
* @expectedExceptionMessageRegExp "API File not found: [\w\W]*\/drafter\/non_existing_including_apib"
6057
*
6158
* @return void
6259
*/
6360
public function testFilenameSetupWrong(): void
6461
{
62+
$this->expectException('\PHPDraft\Parse\ExecutionException');
63+
$this->expectExceptionMessageMatches('/API File not found: .*\/drafter\/non_existing_including_apib/');
64+
$this->expectExceptionCode(1);
65+
6566
$property = $this->reflection->getProperty('filename');
6667
$property->setAccessible(true);
6768
$property->setValue($this->class, TEST_STATICS . '/drafter/non_existing_including_apib');
@@ -96,4 +97,4 @@ public function testParseBasic(): void
9697
$this->assertSame($text, $this->class->__toString());
9798
}
9899

99-
}
100+
}

0 commit comments

Comments
 (0)