File tree Expand file tree Collapse file tree 2 files changed +27
-8
lines changed
Expand file tree Collapse file tree 2 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 22
33namespace GnaHotelSolutions \LaravelTrailingSlash \Tests ;
44
5- use Orchestra \Testbench \TestCase ;
5+ use Orchestra \Testbench \TestCase as BaseTestCase ;
66use GnaHotelSolutions \LaravelTrailingSlash \LaravelTrailingSlashServiceProvider ;
77
8- class ExampleTest extends TestCase
8+ class TestCase extends BaseTestCase
99{
1010
1111 protected function getPackageProviders ($ app )
1212 {
1313 return [LaravelTrailingSlashServiceProvider::class];
1414 }
15-
16- /** @test */
17- public function true_is_true ()
18- {
19- $ this ->assertTrue (true );
20- }
15+
2116}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace GnaHotelSolutions \LaravelTrailingSlash \Tests ;
4+
5+ class TrailingSlashUrlGeneratorTest extends TestCase
6+ {
7+ public function setUp (): void
8+ {
9+ parent ::setUp ();
10+ }
11+
12+ /** @test */
13+ public function if_configuration_activator_is_enabled_url_ends_with_trailing_slash ()
14+ {
15+ $ this ->assertTrue (substr (url ('profile ' ), -1 ) === '/ ' );
16+ }
17+
18+ /** @test */
19+ public function if_configuration_activator_is_disabled_url_ends_with_no_trailing_slash ()
20+ {
21+ config ()->set ('laravel-trailing-slash.active ' , false );
22+ $ this ->assertFalse (substr (url ('profile ' ), -1 ) === '/ ' );
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments