Skip to content

Commit

Permalink
PHPUnit 8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Jan 17, 2020
1 parent 733882f commit bb95429
Show file tree
Hide file tree
Showing 22 changed files with 286 additions and 230 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"require-dev": {
"lunr/halo": "dev-master",
"phpunit/phpunit": "~7.0",
"phpunit/phpunit": "~8.0",
"theseer/autoload": "~1.0",
"phing/phing": "~2.0"
},
Expand Down
162 changes: 105 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/PHPDraft/In/Tests/ApibFileParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ public function testFilenameSetup(): void

/**
* Test if exception when the file doesn't exist
* @expectedException \PHPDraft\Parse\ExecutionException
* @expectedExceptionCode 1
* @expectedExceptionMessageRegExp "API File not found: [\w\W]*\/drafter\/non_existing_including_apib"
*
* @return void
*/
public function testFilenameSetupWrong(): void
{
$this->expectException('\PHPDraft\Parse\ExecutionException');
$this->expectExceptionMessageMatches('/API File not found: .*\/drafter\/non_existing_including_apib/');
$this->expectExceptionCode(1);

$property = $this->reflection->getProperty('filename');
$property->setAccessible(true);
$property->setValue($this->class, TEST_STATICS . '/drafter/non_existing_including_apib');
Expand Down Expand Up @@ -96,4 +97,4 @@ public function testParseBasic(): void
$this->assertSame($text, $this->class->__toString());
}

}
}
Loading

0 comments on commit bb95429

Please sign in to comment.