Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
resetKeyedRoutes example
$tour
=
$this
->
getMockBuilder
(
'\Drupal\tour\Entity\Tour'
)
->
disableOriginalConstructor
(
)
->
onlyMethods
(
[
'getRoutes'
]
)
->
getMock
(
)
;
$tour
->
expects
(
$this
->
any
(
)
)
->
method
(
'getRoutes'
)
->
willReturn
(
$routes
)
;
$this
->
assertSame
(
$result
,
$tour
->
hasMatchingRoute
(
$route_name
,
$route_params
)
)
;
$tour
->
resetKeyedRoutes
(
)
;
}
/** * Provides sample routes for testing. */
public
function
routeProvider
(
)
{
return
[
// Simple match.
[
[
[
'route_name' => 'some.route'
]
,
]
,