8
8
9
9
namespace MiladRahimi \PhpRouter \Tests ;
10
10
11
+ use MiladRahimi \PhpRouter \Enums \GroupAttributes ;
11
12
use MiladRahimi \PhpRouter \Enums \HttpMethods ;
12
- use MiladRahimi \PhpRouter \Enums \RouteAttributes ;
13
13
use MiladRahimi \PhpRouter \Router ;
14
14
use MiladRahimi \PhpRouter \Tests \Classes \SampleMiddleware ;
15
15
use Throwable ;
@@ -40,7 +40,7 @@ public function test_middleware_object()
40
40
$ groupMiddleware = new SampleMiddleware (777 );
41
41
42
42
$ groupAttributes = [
43
- RouteAttributes ::MIDDLEWARE => $ groupMiddleware ,
43
+ GroupAttributes ::MIDDLEWARE => $ groupMiddleware ,
44
44
];
45
45
46
46
$ router = $ this ->createRouter ();
@@ -61,7 +61,7 @@ public function test_middleware_object()
61
61
public function test_string_middleware ()
62
62
{
63
63
$ groupAttributes = [
64
- RouteAttributes ::MIDDLEWARE => SampleMiddleware::class,
64
+ GroupAttributes ::MIDDLEWARE => SampleMiddleware::class,
65
65
];
66
66
67
67
$ router = $ this ->createRouter ();
@@ -84,7 +84,7 @@ public function test_middleware_it_should_ignore_group_middleware_where_route_mi
84
84
$ routeMiddleware = new SampleMiddleware (1002 );
85
85
86
86
$ groupAttributes = [
87
- RouteAttributes ::MIDDLEWARE => $ groupMiddleware ,
87
+ GroupAttributes ::MIDDLEWARE => $ groupMiddleware ,
88
88
];
89
89
90
90
$ router = $ this ->createRouter ();
@@ -108,7 +108,7 @@ public function test_prefix()
108
108
$ this ->mockRequest (HttpMethods::GET , 'http://example.com/group/page ' );
109
109
110
110
$ groupAttributes = [
111
- RouteAttributes ::PREFIX => '/group ' ,
111
+ GroupAttributes ::PREFIX => '/group ' ,
112
112
];
113
113
114
114
$ router = $ this ->createRouter ();
@@ -130,7 +130,7 @@ public function test_domain()
130
130
$ this ->mockRequest (HttpMethods::GET , 'http://sub.domain.tld/ ' );
131
131
132
132
$ groupAttributes = [
133
- RouteAttributes ::DOMAIN => 'sub.domain.tld ' ,
133
+ GroupAttributes ::DOMAIN => 'sub.domain.tld ' ,
134
134
];
135
135
136
136
$ router = $ this ->createRouter ();
@@ -152,7 +152,7 @@ public function test_domain_it_should_ignore_group_domain_where_route_domain_is_
152
152
$ this ->mockRequest (HttpMethods::GET , 'http://sub2.domain.tld/ ' );
153
153
154
154
$ groupAttributes = [
155
- RouteAttributes ::DOMAIN => 'sub1.domain.tld ' ,
155
+ GroupAttributes ::DOMAIN => 'sub1.domain.tld ' ,
156
156
];
157
157
158
158
$ router = $ this ->createRouter ();
0 commit comments