summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php')
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
index 3a040dedd6..c03e8c4a92 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
@@ -35,14 +35,14 @@ class RoutableFragmentRendererTest extends TestCase
public function getGenerateFragmentUriData()
{
- return array(
- array('/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array(), array())),
- array('/_fragment?_path=_format%3Dxml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('_format' => 'xml'), array())),
- array('/_fragment?_path=foo%3Dfoo%26_format%3Djson%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => 'foo', '_format' => 'json'), array())),
- array('/_fragment?bar=bar&_path=foo%3Dfoo%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => 'foo'), array('bar' => 'bar'))),
- array('/_fragment?foo=foo&_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array(), array('foo' => 'foo'))),
- array('/_fragment?_path=foo%255B0%255D%3Dfoo%26foo%255B1%255D%3Dbar%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', array('foo' => array('foo', 'bar')), array())),
- );
+ return [
+ ['/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', [], [])],
+ ['/_fragment?_path=_format%3Dxml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['_format' => 'xml'], [])],
+ ['/_fragment?_path=foo%3Dfoo%26_format%3Djson%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['foo' => 'foo', '_format' => 'json'], [])],
+ ['/_fragment?bar=bar&_path=foo%3Dfoo%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['foo' => 'foo'], ['bar' => 'bar'])],
+ ['/_fragment?foo=foo&_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', [], ['foo' => 'foo'])],
+ ['/_fragment?_path=foo%255B0%255D%3Dfoo%26foo%255B1%255D%3Dbar%26_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', ['foo' => ['foo', 'bar']], [])],
+ ];
}
public function testGenerateFragmentUriWithARequest()
@@ -50,7 +50,7 @@ class RoutableFragmentRendererTest extends TestCase
$request = Request::create('/');
$request->attributes->set('_format', 'json');
$request->setLocale('fr');
- $controller = new ControllerReference('controller', array(), array());
+ $controller = new ControllerReference('controller', [], []);
$this->assertEquals('/_fragment?_path=_format%3Djson%26_locale%3Dfr%26_controller%3Dcontroller', $this->callGenerateFragmentUriMethod($controller, $request));
}
@@ -66,10 +66,10 @@ class RoutableFragmentRendererTest extends TestCase
public function getGenerateFragmentUriDataWithNonScalar()
{
- return array(
- array(new ControllerReference('controller', array('foo' => new Foo(), 'bar' => 'bar'), array())),
- array(new ControllerReference('controller', array('foo' => array('foo' => 'foo'), 'bar' => array('bar' => new Foo())), array())),
- );
+ return [
+ [new ControllerReference('controller', ['foo' => new Foo(), 'bar' => 'bar'], [])],
+ [new ControllerReference('controller', ['foo' => ['foo' => 'foo'], 'bar' => ['bar' => new Foo()]], [])],
+ ];
}
private function callGenerateFragmentUriMethod(ControllerReference $reference, Request $request, $absolute = false)