protected function createExtendedRouter($partial = true) { $router = $this->mock(ExtendedRouter::class, [null => null]); if ($partial) { $router = $router->makePartial(); } return $router->shouldAllowMockingProtectedMethods(); }