PHP 5.4 test

This commit is contained in:
Ahmad Nassri
2015-01-14 20:01:38 -05:00
parent bcc2a3bc19
commit 1ad47092de

View File

@@ -7,6 +7,11 @@ class UnirestFileTest extends \PHPUnit_Framework_TestCase
public function testCURLFile() public function testCURLFile()
{ {
$file = File::add(UPLOAD_FIXTURE); $file = File::add(UPLOAD_FIXTURE);
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); $this->assertTrue($file instanceof \CURLFile);
} }
} }
}