Skip to content

Commit

Permalink
Migrate for phpunit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Apr 1, 2020
1 parent 840a830 commit e81e844
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/phpunit/Unit/MarksimpleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testBasic()
{
$testee = new Marksimple();
try {
static::assertInternalType('object', $testee);
static::assertIsObject($testee);
} catch (Exception $error) {
}
}
Expand Down Expand Up @@ -105,10 +105,11 @@ public function testRemoveAllRules()
}

/**
* @expectedException \Bueltge\Marksimple\Exception\UnknownRuleException
* Test for unknown rule.
*/
public function testRemoveUnknownRule()
{
$this->expectException(UnknownRuleException::class);
(new Marksimple())->removeRule('unknown_rule');
}

Expand All @@ -129,11 +130,10 @@ public function testParse()
*
* @throws Exception
* @throws InvalideFileException
* @expectedException Exception
* @expectedExceptionMessage File "noFile" does not exist.
*/
public function testParseFileNoExist()
{
$this->expectException(InvalideFileException::class);
$testee = new Marksimple();
$testee->parseFile('noFile');
}
Expand All @@ -143,11 +143,10 @@ public function testParseFileNoExist()
*
* @throws Exception
* @throws InvalideFileException
* @expectedException Exception
* @expectedExceptionMessageRegExp /File.* cannot be read./
*/
public function testParseFileNoReadable()
{
$this->expectException(InvalideFileException::class);
$testee = new Marksimple();
$testee->parseFile($this->noReadableFile);
}
Expand Down

0 comments on commit e81e844

Please sign in to comment.