Skip to content

Commit 4546287

Browse files
committed
ITT: Helpers class renamed.
1 parent 3d9725e commit 4546287

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ Provides Laravel-specific testing helpers and asserts.
5858
5959
> New helpers are always adding. Feel free to contribute.
6060
61-
- [ArtisanHelpers](#artisanhelpers)
62-
- [runConsoleCommand](#runconsolecommand)
63-
- [EmulatesEnvironment](#emulatesenvironment)
61+
- [ApplicationHelpers](#applicationhelpers)
6462
- [emulateLocal](#emulatelocal)
6563
- [emulateProduction](#emulateproduction)
64+
- [ArtisanHelpers](#artisanhelpers)
65+
- [runConsoleCommand](#runconsolecommand)
6666
6767
## Available asserts
6868
@@ -112,38 +112,38 @@ Provides Laravel-specific testing helpers and asserts.
112112
113113
## Helpers
114114
115-
### ArtisanHelpers
115+
### ApplicationHelpers
116116
117-
#### `runConsoleCommand()`
117+
#### `emulateLocal()`
118118
119-
Runs console command directly by the class name, and return it:
119+
Emulates that application is working at `local` environment:
120120
121121
```php
122-
$command = $this->runConsoleCommand(MyCommand::class, ['--name' => 'John']);
122+
$this->emulateLocal();
123123
```
124124
125-
Also, you can run command via command object directly:
125+
#### `emulateProduction()`
126+
127+
Emulates that application is working at `production` environment:
126128
127129
```php
128-
$command = $this->runConsoleCommand(new MyCommand, ['--name' => 'Jane']);
130+
$this->emulateProduction();
129131
```
130132
131-
### EmulatesEnvironment
133+
### ArtisanHelpers
132134
133-
#### `emulateLocal()`
135+
#### `runConsoleCommand()`
134136
135-
Emulates that application is working at `local` environment:
137+
Runs console command directly by the class name, and return it:
136138
137139
```php
138-
$this->emulateLocal();
140+
$command = $this->runConsoleCommand(MyCommand::class, ['--name' => 'John']);
139141
```
140142
141-
#### `emulateProduction()`
142-
143-
Emulates that application is working at `production` environment:
143+
Also, you can run command via command object directly:
144144
145145
```php
146-
$this->emulateProduction();
146+
$command = $this->runConsoleCommand(new MyCommand, ['--name' => 'Jane']);
147147
```
148148
149149
## Asserts

src/Helpers/EmulatesEnvironment.php renamed to src/Helpers/ApplicationHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Illuminated\Testing\Helpers;
44

5-
trait EmulatesEnvironment
5+
trait ApplicationHelpers
66
{
77
protected function emulateLocal()
88
{

src/TestingTools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
use Illuminated\Testing\Asserts\ScheduleAsserts;
1313
use Illuminated\Testing\Asserts\ServiceProviderAsserts;
1414
use Illuminated\Testing\Asserts\TraitAsserts;
15+
use Illuminated\Testing\Helpers\ApplicationHelpers;
1516
use Illuminated\Testing\Helpers\ArtisanHelpers;
16-
use Illuminated\Testing\Helpers\EmulatesEnvironment;
1717

1818
trait TestingTools
1919
{
20+
use ApplicationHelpers;
2021
use ArtisanHelpers;
21-
use EmulatesEnvironment;
2222

2323
use ArtisanAsserts;
2424
use CollectionAsserts;

tests/Helpers/EmulatesEnvironmentTest.php renamed to tests/Helpers/ApplicationHelpersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
class EmulatesEnvironmentTest extends TestCase
3+
class ApplicationHelpersTest extends TestCase
44
{
55
/** @test */
66
public function it_can_emulate_local_environment()

tests/TestingToolsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
use Illuminated\Testing\Asserts\ScheduleAsserts;
1111
use Illuminated\Testing\Asserts\ServiceProviderAsserts;
1212
use Illuminated\Testing\Asserts\TraitAsserts;
13+
use Illuminated\Testing\Helpers\ApplicationHelpers;
1314
use Illuminated\Testing\Helpers\ArtisanHelpers;
14-
use Illuminated\Testing\Helpers\EmulatesEnvironment;
1515
use Illuminated\Testing\TestingTools;
1616

1717
class TestingToolsTest extends TestCase
1818
{
1919
/** @test */
2020
public function it_is_using_all_testing_tools_helpers()
2121
{
22+
$this->assertTraitUsed(TestingTools::class, ApplicationHelpers::class);
2223
$this->assertTraitUsed(TestingTools::class, ArtisanHelpers::class);
23-
$this->assertTraitUsed(TestingTools::class, EmulatesEnvironment::class);
2424
}
2525

2626
/** @test */

0 commit comments

Comments
 (0)