Skip to content

Commit 08b68f3

Browse files
authored
Merge pull request #112 from vctls/master
Made test compatible with php 5.3 and hhvm.
2 parents 416d34b + 4824219 commit 08b68f3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Tests/app/Controller/FakeController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public function readerAction()
4848
$reader = $factory->createReader('Excel5');
4949
// check that the file can be read
5050
$canread = $reader->canRead($filename);
51-
// chack that an empty temporary file cannot be read
52-
$someFile = tmpfile();
53-
$cannotread = $reader->canRead(stream_get_meta_data($someFile)['uri']);
54-
fclose($someFile);
51+
// check that an empty temporary file cannot be read
52+
$someFile = tempnam($this->getParameter('kernel.root_dir'), "tmp");
53+
$cannotread = $reader->canRead($someFile);
54+
unlink($someFile);
5555
// load the excel file
5656
$phpExcelObject = $reader->load($filename);
5757
// read some data

0 commit comments

Comments
 (0)