From 1ad47092dec9195fc01c59bb58e484da17fc023b Mon Sep 17 00:00:00 2001 From: Ahmad Nassri Date: Wed, 14 Jan 2015 20:01:38 -0500 Subject: [PATCH] PHP 5.4 test --- tests/Unirest/FileTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Unirest/FileTest.php b/tests/Unirest/FileTest.php index 525f074..b7316a3 100644 --- a/tests/Unirest/FileTest.php +++ b/tests/Unirest/FileTest.php @@ -7,6 +7,11 @@ class UnirestFileTest extends \PHPUnit_Framework_TestCase public function testCURLFile() { $file = File::add(UPLOAD_FIXTURE); - $this->assertTrue($file instanceof \CURLFile); + + if (PHP_MAJOR_VERSION === 5 && PHP_MINOR_VERSION === 4) { + $this->assertEquals($file, sprintf('@%s;filename=%s;type=', UPLOAD_FIXTURE, basename(UPLOAD_FIXTURE))); + } else { + $this->assertTrue($file instanceof \CURLFile); + } } }