Skip to content

Commit 447ea79

Browse files
committed
bug symfony#16921 Fix short array syntax for php 5.3 (ewgRa)
This PR was merged into the 2.7 branch. Discussion ---------- Fix short array syntax for php 5.3 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 70afcc8 fix short array syntax for php 5.3
2 parents 0b0070e + 70afcc8 commit 447ea79

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Symfony/Component/Serializer/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)