Skip to content

Commit 7f56a73

Browse files
committed
Merge pull request #5 from Rican7/hotfix/new-php-test-fix
Hotfix - PHP 5.4.16 - Unit Test Fix
2 parents 50c763a + 940f523 commit 7f56a73

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/OneMightyRoar/PhpFileManager/Tests/FileObjectTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,16 @@ public function testGetExtension()
394394

395395
$this->assertSame('jpeg', $wrapped_binary->getExtension());
396396
$this->assertSame('plain', $wrapped_base64->getExtension());
397-
$this->assertSame('c++', $wrapped_binary_php->getExtension());
398397
$this->assertSame('jpg', $raw_binary->getExtension());
399398
$this->assertSame('base64', $raw_base64->getExtension());
400399
$this->assertSame('php', $raw_binary_php->getExtension());
401400

401+
/**
402+
* __FILE__ may show as C++ or PHP, depending on the version
403+
* This should be fixed as of PHP 5.4.15 or 5.4.16 (not exactly sure)
404+
*/
405+
$this->assertTrue(in_array($wrapped_binary_php->getExtension(), array('c++', 'php')));
406+
402407
// With dot?
403408
$this->assertNotContains('.', $wrapped_binary->getExtension(false));
404409
$this->assertContains('.', $wrapped_binary->getExtension(true));

0 commit comments

Comments
 (0)