@@ -119,28 +119,14 @@ public function testCanGetResources(): void
119119
120120 public function testCanGetDefaultValueWithFunction (): void
121121 {
122- App ::setResource ('first ' , fn ($ second ) => "first- {$ second }" , ['second ' ]);
123- App ::setResource ('second ' , fn () => 'second ' );
122+ Http ::setResource ('first ' , fn ($ second ) => "first- {$ second }" , ['second ' ]);
123+ Http ::setResource ('second ' , fn () => 'second ' );
124124
125- $ second = $ this ->app ->getResource ('second ' );
126- $ first = $ this ->app ->getResource ('first ' );
125+ $ second = $ this ->http ->getResource ('second ' );
126+ $ first = $ this ->http ->getResource ('first ' );
127127 $ this ->assertEquals ('second ' , $ second );
128128 $ this ->assertEquals ('first-second ' , $ first );
129129
130- // Default Params
131- $ route = new Route ('GET ' , '/path ' );
132-
133- $ route
134- ->param ('x ' , 'x-def ' , new Text (200 ), 'x param ' , true )
135- ->action (function ($ x ) {
136- echo $ x ;
137- });
138-
139- \ob_start ();
140- $ this ->app ->execute ($ route , new Request (), new Response ());
141- $ result = \ob_get_contents ();
142- \ob_end_clean ();
143-
144130 // Default Value using function
145131 $ route = new Route ('GET ' , '/path ' );
146132
@@ -153,7 +139,7 @@ public function testCanGetDefaultValueWithFunction(): void
153139 });
154140
155141 \ob_start ();
156- $ this ->app ->execute ($ route , new Request (), new Response () );
142+ $ this ->http ->execute ($ route , new Request (), ' 1 ' );
157143 $ result = \ob_get_contents ();
158144 \ob_end_clean ();
159145
0 commit comments