Skip to content

Commit 203a13b

Browse files
committed
fix short array syntax for php 5.3
1 parent 4380634 commit 203a13b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Tests/Normalizer/AbstractNormalizerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class AbstractNormalizerTest extends \PHPUnit_Framework_TestCase
2626

2727
protected function setUp()
2828
{
29-
$loader = $this->getMock('Symfony\Component\Serializer\Mapping\Loader\LoaderChain', [], [[]]);
30-
$this->classMetadata = $this->getMock('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory', [], [$loader]);
29+
$loader = $this->getMock('Symfony\Component\Serializer\Mapping\Loader\LoaderChain', array(), array(array()));
30+
$this->classMetadata = $this->getMock('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory', array(), array($loader));
3131
$this->normalizer = new AbstractNormalizerDummy($this->classMetadata);
3232
}
3333

@@ -53,11 +53,11 @@ public function testGetAllowedAttributesAsString()
5353

5454
$this->classMetadata->method('getMetadataFor')->willReturn($classMetadata);
5555

56-
$result = $this->normalizer->getAllowedAttributes('c', ['groups' => ['test']], true);
57-
$this->assertEquals(['a2', 'a4'], $result);
56+
$result = $this->normalizer->getAllowedAttributes('c', array('groups' => array('test')), true);
57+
$this->assertEquals(array('a2', 'a4'), $result);
5858

59-
$result = $this->normalizer->getAllowedAttributes('c', ['groups' => ['other']], true);
60-
$this->assertEquals(['a3', 'a4'], $result);
59+
$result = $this->normalizer->getAllowedAttributes('c', array('groups' => array('other')), true);
60+
$this->assertEquals(array('a3', 'a4'), $result);
6161
}
6262

6363
public function testGetAllowedAttributesAsObjects()
@@ -82,10 +82,10 @@ public function testGetAllowedAttributesAsObjects()
8282

8383
$this->classMetadata->method('getMetadataFor')->willReturn($classMetadata);
8484

85-
$result = $this->normalizer->getAllowedAttributes('c', ['groups' => ['test']], false);
86-
$this->assertEquals([$a2, $a4], $result);
85+
$result = $this->normalizer->getAllowedAttributes('c', array('groups' => array('test')), false);
86+
$this->assertEquals(array($a2, $a4), $result);
8787

88-
$result = $this->normalizer->getAllowedAttributes('c', ['groups' => ['other']], false);
89-
$this->assertEquals([$a3, $a4], $result);
88+
$result = $this->normalizer->getAllowedAttributes('c', array('groups' => array('other')), false);
89+
$this->assertEquals(array($a3, $a4), $result);
9090
}
9191
}

0 commit comments

Comments
 (0)