Skip to content

Commit e773ebe

Browse files
author
Andrey Helldar
committed
Updated tests
1 parent 5297d34 commit e773ebe

File tree

2 files changed

+48
-20
lines changed

2 files changed

+48
-20
lines changed

tests/AjaxTest.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
}

tests/ViewTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)