diff --git a/tests/unit/MyArrayHelperTest.php b/tests/unit/MyArrayHelperTest.php index 262bb46..b5366a7 100644 --- a/tests/unit/MyArrayHelperTest.php +++ b/tests/unit/MyArrayHelperTest.php @@ -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 = [