Skip to content

Commit 237f0cb

Browse files
committed
Fixed PHPUnit <5.2 tests
1 parent a3490a7 commit 237f0cb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/InvalidFormatTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class InvalidFormatTest extends \PHPUnit_Framework_TestCase
2525
*/
2626
public function testInvalidFormat($product, $version)
2727
{
28-
if (version_compare(PHP_VERSION, '5.6.0', '>')) {
28+
if (version_compare(PHP_VERSION, '5.6.0', '<')) {
2929
$this->markTestSkipped();
30+
return;
3031
}
3132
$this->expectException(FormatException::class);
3233
new UserAgentParser($product, $version);

tests/TruncateInvalidTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class TruncateInvalidTest extends \PHPUnit_Framework_TestCase
2424
*/
2525
public function testTruncateInvalid($product, $version)
2626
{
27-
if (version_compare(PHP_VERSION, '5.6.0', '>')) {
27+
if (version_compare(PHP_VERSION, '5.6.0', '<')) {
2828
$this->markTestSkipped();
29+
return;
2930
}
3031
$this->expectException(\PHPUnit_Framework_Error_Warning::class);
3132
new UserAgentParser($product, $version);

0 commit comments

Comments
 (0)