Skip to content

Commit fb6ae37

Browse files
committed
test fix for old phps
1 parent e300d2a commit fb6ae37

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/AllTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class AllTest extends \PHPUnit_Framework_TestCase {
1010
* Test if is available
1111
*/
1212
public function testAvailability() {
13-
foreach ([
13+
foreach (array(
1414
'tar' => null,
1515
'zipfile' => null
16-
] as $class => $must_be_instance_of) {
16+
) as $class => $must_be_instance_of) {
1717
$this->assertTrue(class_exists($class, true), $class . " class doesn't exist");
1818
if ($must_be_instance_of !== null) {
1919
$instance = $this->getClassInstance($class);
@@ -46,7 +46,7 @@ private function getClassInstance($class) {
4646
*/
4747
public function testMethodsAvailability() {
4848
foreach ([
49-
'tar' => [
49+
'tar' => array(
5050
'openTAR',
5151
'appendTar',
5252
'getFile',
@@ -60,11 +60,11 @@ public function testMethodsAvailability() {
6060
'saveTar',
6161
'toTar',
6262
'toTarOutput'
63-
],
64-
'zipfile' => [
63+
),
64+
'zipfile' => array(
6565
'addFile',
6666
'file'
67-
]
67+
)
6868
] as $class => $methods) {
6969
foreach ($methods as $method) {
7070
$this->assertTrue(method_exists($class, $method), 'Static method ' . $method . ' doesn\'t exists for class ' . $class);
@@ -76,12 +76,12 @@ public function testMethodsAvailability() {
7676
* Tests variables availability and types
7777
*/
7878
public function testVariables() {
79-
foreach ([
80-
'tar' => [
79+
foreach (array(
80+
'tar' => array(
8181
'numFiles' => 'null', // int
8282
'files' => 'null' // array
83-
]
84-
] as $class => $variables) {
83+
)
84+
) as $class => $variables) {
8585
$instance = $this->getClassInstance($class);
8686
foreach ($variables as $variable => $type) {
8787
$this->assertInternalType($type, $instance->$variable, '$' . $variable . ' is not of type ' . $type . ' in instance of ' . $class);

0 commit comments

Comments
 (0)