Skip to content

Commit 1eb7d53

Browse files
committed
Restore PHP 5 compat on KeyTest class
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent f4e4e53 commit 1eb7d53

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

tests/Components/KeyTest.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testParse()
2020
$this->assertNull($component->options);
2121
$this->assertNull($component->name);
2222
$this->assertNull($component->expr);
23-
$this->assertSame([], $component->columns);
23+
$this->assertSame(array(), $component->columns);
2424
}
2525

2626
public function testParseKeyWithoutOptions()
@@ -33,11 +33,11 @@ public function testParseKeyWithoutOptions()
3333
$this->assertEquals('alias_type_idx', $component->name);
3434
$this->assertEquals(new OptionsArray(), $component->options);
3535
$this->assertNull($component->expr);
36-
$this->assertSame([
37-
[
36+
$this->assertSame(array(
37+
array(
3838
'name' => 'alias_type',
39-
]
40-
], $component->columns);
39+
)
40+
), $component->columns);
4141
}
4242

4343
public function testParseKeyWithLengthWithoutOptions()
@@ -50,12 +50,12 @@ public function testParseKeyWithLengthWithoutOptions()
5050
$this->assertEquals('alias_type_idx', $component->name);
5151
$this->assertEquals(new OptionsArray(), $component->options);
5252
$this->assertNull($component->expr);
53-
$this->assertSame([
54-
[
53+
$this->assertSame(array(
54+
array(
5555
'name' => 'alias_type',
5656
'length' => 10,
57-
]
58-
], $component->columns);
57+
)
58+
), $component->columns);
5959
}
6060

6161
public function testParseKeyWithLengthWithOptions()
@@ -67,22 +67,22 @@ public function testParseKeyWithLengthWithOptions()
6767
$this->assertEquals('KEY', $component->type);
6868
$this->assertEquals('alias_type_idx', $component->name);
6969
$this->assertEquals(new OptionsArray(
70-
[
71-
4 => [
70+
array(
71+
4 => array(
7272
'name' => 'COMMENT',
7373
'equals' => false,
7474
'expr' => '\'my comment\'',
7575
'value' => 'my comment',
76-
]
77-
]
76+
)
77+
)
7878
), $component->options);
7979
$this->assertNull($component->expr);
80-
$this->assertSame([
81-
[
80+
$this->assertSame(array(
81+
array(
8282
'name' => 'alias_type',
8383
'length' => 10,
84-
]
85-
], $component->columns);
84+
)
85+
), $component->columns);
8686
}
8787

8888
public function testParseKeyExpressionWithoutOptions()
@@ -104,7 +104,7 @@ public function testParseKeyExpressionWithoutOptions()
104104
$expr,
105105
$component->expr
106106
);
107-
$this->assertSame([], $component->columns);
107+
$this->assertSame(array(), $component->columns);
108108
}
109109

110110
public function testParseKeyExpressionWithOptions()
@@ -118,14 +118,14 @@ public function testParseKeyExpressionWithOptions()
118118
$this->assertEquals('KEY', $component->type);
119119
$this->assertEquals('updated_tz_ind2', $component->name);
120120
$this->assertEquals(new OptionsArray(
121-
[
122-
4 => [
121+
array(
122+
4 => array(
123123
'name' => 'COMMENT',
124124
'equals' => false,
125125
'expr' => '\'my comment\'',
126126
'value' => 'my comment',
127-
]
128-
]
127+
)
128+
)
129129
), $component->options);
130130
$expr = new Expression(
131131
'(convert_tz(`cache_updated`,_utf8mb4\'GMT\',_utf8mb4\'GB\'))'
@@ -135,6 +135,6 @@ public function testParseKeyExpressionWithOptions()
135135
$expr,
136136
$component->expr
137137
);
138-
$this->assertSame([], $component->columns);
138+
$this->assertSame(array(), $component->columns);
139139
}
140140
}

0 commit comments

Comments
 (0)