File tree Expand file tree Collapse file tree 2 files changed +48
-20
lines changed Expand file tree Collapse file tree 2 files changed +48
-20
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tests ;
4+
5+ final class AjaxTest extends TestCase
6+ {
7+ public function testStructure ()
8+ {
9+ $ response = $ this ->get ('/routes/json ' );
10+
11+ $ response ->assertStatus (200 );
12+
13+ $ response ->assertJsonStructure ([
14+ '* ' => [
15+ 'priority ' ,
16+ 'methods ' ,
17+ 'domain ' ,
18+ 'path ' ,
19+ 'name ' ,
20+ 'module ' ,
21+ 'action ' ,
22+ 'middlewares ' ,
23+ 'deprecated ' ,
24+ ],
25+ ]);
26+ }
27+
28+ public function testHideMethods ()
29+ {
30+ $ response = $ this ->get ('/routes/json ' );
31+
32+ $ response ->assertStatus (200 );
33+
34+ $ response ->assertDontSee ('"foo" ' , false );
35+ $ response ->assertSee ('"bar" ' , false );
36+ }
37+
38+ public function testHideRoutes ()
39+ {
40+ $ response = $ this ->get ('/routes/json ' );
41+
42+ $ response ->assertStatus (200 );
43+ $ response ->assertSee ('"bar" ' , false );
44+ $ response ->assertDontSee ('_ignition ' );
45+ $ response ->assertDontSee ('telescope ' );
46+ $ response ->assertDontSee ('_debugbar ' );
47+ }
48+ }
Original file line number Diff line number Diff line change @@ -14,24 +14,4 @@ public function testTexts()
1414
1515 $ response ->assertDontSee ('Foo Bar ' );
1616 }
17-
18- public function testHideMethods ()
19- {
20- $ response = $ this ->get ('/routes ' );
21-
22- $ response ->assertStatus (200 );
23- $ response ->assertDontSee ('"foo" ' , false );
24- $ response ->assertSee ('"bar" ' , false );
25- }
26-
27- public function testHideRoutes ()
28- {
29- $ response = $ this ->get ('/routes ' );
30-
31- $ response ->assertStatus (200 );
32- $ response ->assertSee ('"bar" ' , false );
33- $ response ->assertDontSee ('_ignition ' );
34- $ response ->assertDontSee ('telescope ' );
35- $ response ->assertDontSee ('_debugbar ' );
36- }
3717}
You can’t perform that action at this time.
0 commit comments