Skip to content

Commit 5d64a01

Browse files
committed
fix failing test that is including orchestra workbench routes
1 parent 3993256 commit 5d64a01

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Feature/ExportPostmanWithCacheTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ public function test_cached_export_works()
3838

3939
$collection = json_decode(Storage::get('postman/'.config('api-postman.filename')), true);
4040

41-
$routes = $this->app['router']->getRoutes();
41+
$routes = $this->app['router']->getRoutes()->getRoutesByName();
42+
43+
// Filter out workbench routes from orchestra/workbench
44+
$routes = array_filter($routes, function ($route) {
45+
return strpos($route->uri(), 'workbench') === false;
46+
});
4247

4348
$collectionItems = $collection['item'];
4449

0 commit comments

Comments
 (0)