Skip to content

Commit c8647cf

Browse files
committed
ITT: Tests added & readme info added.
1 parent 4546287 commit c8647cf

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Provides Laravel-specific testing helpers and asserts.
6161
- [ApplicationHelpers](#applicationhelpers)
6262
- [emulateLocal](#emulatelocal)
6363
- [emulateProduction](#emulateproduction)
64+
- [emulateEnvironment](#emulateenvironment)
6465
- [ArtisanHelpers](#artisanhelpers)
6566
- [runConsoleCommand](#runconsolecommand)
6667
@@ -130,6 +131,14 @@ Emulates that application is working at `production` environment:
130131
$this->emulateProduction();
131132
```
132133
134+
#### `emulateEnvironment()`
135+
136+
Emulates that application is working at specified environment:
137+
138+
```php
139+
$this->emulateEnvironment('space');
140+
```
141+
133142
### ArtisanHelpers
134143
135144
#### `runConsoleCommand()`

tests/Helpers/ApplicationHelpersTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ class ApplicationHelpersTest extends TestCase
66
public function it_can_emulate_local_environment()
77
{
88
$this->emulateLocal();
9+
910
$this->assertEquals('local', $this->app->environment());
1011
}
1112

1213
/** @test */
1314
public function it_can_emulate_production_environment()
1415
{
1516
$this->emulateProduction();
17+
1618
$this->assertEquals('production', $this->app->environment());
1719
}
20+
21+
/** @test */
22+
public function it_can_emulate_any_environment()
23+
{
24+
$this->emulateEnvironment('space');
25+
26+
$this->assertEquals('space', $this->app->environment());
27+
}
1828
}

0 commit comments

Comments
 (0)