'stdClass' =>
['?foo%5Bbaz%5D=bar', 'foo',
$stdClass],
'stdClass in nested stdClass' =>
['?foo%5Bnested%5D%5Bbaz%5D=bar', 'foo',
$nestedStdClass],
'non stringable object' =>
['', 'foo',
new NonStringableObject()],
'non stringable object but has public property' =>
['?foo%5Bfoo%5D=property', 'foo',
new NonStringableObjectWithPublicProperty()],
];
} public function testUrlWithExtraParametersFromGlobals() { $routes =
$this->
getRoutes('test',
new Route('/testing'
));
$generator =
$this->
getGenerator($routes);
$context =
new RequestContext('/app.php'
);
$context->
setParameter('bar', 'bar'
);
$generator->
setContext($context);
$url =
$generator->
generate('test',
['foo' => 'bar'
]);
$this->
assertEquals('/app.php/testing?foo=bar',
$url);
} public function testUrlWithGlobalParameter() { $routes =
$this->
getRoutes('test',
new Route('/testing/{foo}'
));
$generator =
$this->
getGenerator($routes);