diff --git a/composer.json b/composer.json index f5441cc..83cb78b 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require-dev": { "doctrine/orm": "^2.5", "illuminate/database": "5.0.* || 5.1.* || 5.5.* || ^6.0", - "league/factory-muffin-faker": "^2.0", + "league/factory-muffin-faker": "^2.3", "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20" }, "replace": { diff --git a/tests/FactoryMuffinTest.php b/tests/FactoryMuffinTest.php index c1b8f2c..b3ffc26 100644 --- a/tests/FactoryMuffinTest.php +++ b/tests/FactoryMuffinTest.php @@ -30,7 +30,12 @@ public function testDefaultingToFaker() $this->assertArrayHasKey('name', $obj->card); $this->assertArrayHasKey('expirationDate', $obj->card); - $this->assertSame('https://lorempixel.com/400/600', substr($obj->image, 0, 30)); + if (version_compare(PHP_VERSION, '7.1.0') >= 0 && !defined('HHVM_VERSION')) { + $this->assertSame('https://via.placeholder.com/400x600', substr($obj->image, 0, 35)); + } else { + $this->assertSame('https://lorempixel.com/400/600', substr($obj->image, 0, 30)); + } + $this->assertNotEquals('unique::text', $obj->unique_text); $this->assertNotEquals('optional::text', $obj->optional_text); }