Skip to content

Commit

Permalink
Move Router into root namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 9, 2022
1 parent 6823702 commit bbe76cc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/framework/src/Models/NavigationMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Hyde\Framework\Models;

use Hyde\Framework\Contracts\RouteContract;
use Hyde\Framework\Services\Router;
use Hyde\Framework\Router;
use Illuminate\Support\Collection;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/src/Models/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Hyde\Framework\Contracts\RouteFacadeContract;
use Hyde\Framework\Exceptions\RouteNotFoundException;
use Hyde\Framework\Hyde;
use Hyde\Framework\Services\Router;
use Hyde\Framework\Router;
use Illuminate\Support\Collection;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Hyde\Framework\Services;
namespace Hyde\Framework;

use Hyde\Framework\Contracts\PageContract;
use Hyde\Framework\Contracts\RouteContract;
Expand Down
1 change: 1 addition & 0 deletions packages/framework/src/Services/BuildService.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Hyde\Framework\Concerns\InteractsWithDirectories;
use Hyde\Framework\Contracts\RouteContract as Route;
use Hyde\Framework\Hyde;
use Hyde\Framework\Router;
use Hyde\Framework\StaticPageBuilder;
use Illuminate\Console\Concerns\InteractsWithIO;
use Illuminate\Console\OutputStyle;
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/tests/Feature/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Hyde\Framework\Models\Pages\MarkdownPage;
use Hyde\Framework\Models\Pages\MarkdownPost;
use Hyde\Framework\Models\Route;
use Hyde\Framework\Services\Router;
use Hyde\Framework\Router;
use Hyde\Testing\TestCase;

/**
Expand Down
18 changes: 9 additions & 9 deletions packages/framework/tests/Feature/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
use Hyde\Framework\Models\Pages\MarkdownPage;
use Hyde\Framework\Models\Pages\MarkdownPost;
use Hyde\Framework\Models\Route;
use Hyde\Framework\Services\Router;
use Hyde\Framework\Router;
use Hyde\Testing\TestCase;
use Illuminate\Support\Collection;

/**
* @covers \Hyde\Framework\Services\Router
* @covers \Hyde\Framework\Router
*/
class RouterTest extends TestCase
{
/**
* @covers \Hyde\Framework\Services\Router::getInstance
* @covers \Hyde\Framework\Router::getInstance
*/
public function test_get_instance_returns_the_router_instance()
{
Expand All @@ -31,8 +31,8 @@ public function test_get_instance_returns_the_router_instance()
/**
* Test route autodiscovery.
*
* @covers \Hyde\Framework\Services\Router::__construct
* @covers \Hyde\Framework\Services\Router::getRoutes
* @covers \Hyde\Framework\Router::__construct
* @covers \Hyde\Framework\Router::getRoutes
*/
public function test_get_routes_returns_discovered_routes()
{
Expand All @@ -47,7 +47,7 @@ public function test_get_routes_returns_discovered_routes()
}

/**
* @covers \Hyde\Framework\Services\Router::getRoutesForModel
* @covers \Hyde\Framework\Router::getRoutesForModel
*/
public function test_get_routes_for_model_returns_only_routes_for_the_given_model()
{
Expand All @@ -65,9 +65,9 @@ public function test_get_routes_for_model_returns_only_routes_for_the_given_mode
/**
* Test route autodiscovery.
*
* @covers \Hyde\Framework\Services\Router::discover
* @covers \Hyde\Framework\Services\Router::discoverRoutes
* @covers \Hyde\Framework\Services\Router::discoverPageRoutes
* @covers \Hyde\Framework\Router::discover
* @covers \Hyde\Framework\Router::discoverRoutes
* @covers \Hyde\Framework\Router::discoverPageRoutes
*/
public function test_discover_routes_finds_and_adds_all_pages_to_route_collection()
{
Expand Down

0 comments on commit bbe76cc

Please sign in to comment.