Skip to content

Commit

Permalink
fix: phpunit test must use expectExceptionMessageMatches intead of ex…
Browse files Browse the repository at this point in the history
…pectExceptionMessageRegExp

Ref: sebastianbergmann/phpunit#3957
  • Loading branch information
williamdes committed Apr 1, 2020
1 parent d3e5cab commit 239fa7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testException(): void
{
$this->expectException(KBException::class);
$this->expectExceptionCode(0);
$this->expectExceptionMessageRegExp('/(.+) does not exist for this type of documentation !/');
$this->expectExceptionMessageMatches('/(.+) does not exist for this type of documentation !/');
Search::getByName("variable-3", Search::MARIADB);
}

Expand All @@ -84,7 +84,7 @@ public function testExceptionNoFoundGetVariableType(): void
{
$this->expectException(KBException::class);
$this->expectExceptionCode(0);
$this->expectExceptionMessageRegExp('/(.+) does not exist !/');
$this->expectExceptionMessageMatches('/(.+) does not exist !/');
Search::getVariableType("acbdefghi0202");
}

Expand All @@ -98,7 +98,7 @@ public function testExceptionNoFound(): void
{
$this->expectException(KBException::class);
$this->expectExceptionCode(0);
$this->expectExceptionMessageRegExp('/(.+) does not exist !/');
$this->expectExceptionMessageMatches('/(.+) does not exist !/');
Search::getByName("acbdefghi0202", Search::MARIADB);
}

Expand All @@ -112,7 +112,7 @@ public function testExceptionNoFoundGetVariable(): void
{
$this->expectException(KBException::class);
$this->expectExceptionCode(0);
$this->expectExceptionMessageRegExp('/(.+) does not exist !/');
$this->expectExceptionMessageMatches('/(.+) does not exist !/');
Search::getVariable("acbdefghi0202");
}

Expand All @@ -127,7 +127,7 @@ public function testExceptionLoadData(): void
{
$this->expectException(KBException::class);
$this->expectExceptionCode(0);
$this->expectExceptionMessageRegExp('/(.+) does not exist !/');
$this->expectExceptionMessageMatches('/(.+) does not exist !/');
Search::$DATA_DIR = ".";
Search::$loaded = false;
Search::loadData();
Expand Down Expand Up @@ -160,7 +160,7 @@ public function testExceptionGetVariableType(): void
{
$this->expectException(KBException::class);
$this->expectExceptionCode(0);
$this->expectExceptionMessageRegExp('/(.+) does have a known type !/');
$this->expectExceptionMessageMatches('/(.+) does have a known type !/');
Search::getVariableType("variable-2");
}

Expand Down

0 comments on commit 239fa7f

Please sign in to comment.