Skip to content

Commit

Permalink
fix tests different exception for php7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Dec 14, 2020
1 parent 1f26da7 commit 30301d7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/unit/MyArrayHelperTest.php
Expand Up @@ -80,16 +80,14 @@ public function testIndexByColumnEmptyArray() {
$this->assertEquals($expected, $result);
}

public function testPhpVersionId() {
$this->assertEquals(PHP_VERSION_ID , 70400);
}


public function testIndexByColumnFailsWithInvalidColumn() {

if (PHP_VERSION_ID < 70400) {
$this->expectException(InvalidArgumentException::class);
} else {
if (intval(PHP_VERSION_ID) >= 70400) {
$this->expectException(ErrorException::class);
} else {
$this->expectException(InvalidArgumentException::class);
}

$input = [
Expand Down

0 comments on commit 30301d7

Please sign in to comment.