/**
* @dataProvider getGenerateFragmentUriData
*/
public function testGenerateAbsoluteFragmentUri($uri,
$controller) { $this->
assertEquals('http://localhost'.
$uri,
$this->
callGenerateFragmentUriMethod($controller, Request::
create('/'
), true
));
} public static function getGenerateFragmentUriData() { 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() { $request = Request::
create('/'
);