Skip to content

Commit 3ff59d1

Browse files
committed
ITT: Helpers class renamed.
1 parent cfadbc8 commit 3ff59d1

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

README.md

Lines changed: 16 additions & 16 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)
6163
- [EmulatesEnvironment](#emulatesenvironment)
6264
- [emulateLocal](#emulatelocal)
6365
- [emulateProduction](#emulateproduction)
64-
- [InteractsWithConsole](#interactswithconsole)
65-
- [runConsoleCommand](#runconsolecommand)
6666
6767
## Available asserts
6868
@@ -112,38 +112,38 @@ Provides Laravel-specific testing helpers and asserts.
112112
113113
## Helpers
114114
115-
### EmulatesEnvironment
115+
### ArtisanHelpers
116116
117-
#### `emulateLocal()`
117+
#### `runConsoleCommand()`
118118
119-
Emulates that application is working at `local` environment:
119+
Runs console command directly by the class name, and return it:
120120
121121
```php
122-
$this->emulateLocal();
122+
$command = $this->runConsoleCommand(MyCommand::class, ['--name' => 'John']);
123123
```
124124
125-
#### `emulateProduction()`
126-
127-
Emulates that application is working at `production` environment:
125+
Also, you can run command via command object directly:
128126
129127
```php
130-
$this->emulateProduction();
128+
$command = $this->runConsoleCommand(new MyCommand, ['--name' => 'Jane']);
131129
```
132130
133-
### InteractsWithConsole
131+
### EmulatesEnvironment
134132
135-
#### `runConsoleCommand()`
133+
#### `emulateLocal()`
136134
137-
Runs console command directly by the class name, and return it:
135+
Emulates that application is working at `local` environment:
138136
139137
```php
140-
$command = $this->runConsoleCommand(MyCommand::class, ['--name' => 'John']);
138+
$this->emulateLocal();
141139
```
142140
143-
Also, you can run command via command object directly:
141+
#### `emulateProduction()`
142+
143+
Emulates that application is working at `production` environment:
144144
145145
```php
146-
$command = $this->runConsoleCommand(new MyCommand, ['--name' => 'Jane']);
146+
$this->emulateProduction();
147147
```
148148
149149
## Asserts

src/Helpers/InteractsWithConsole.php renamed to src/Helpers/ArtisanHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Component\Console\Input\ArrayInput;
77
use Symfony\Component\Console\Output\BufferedOutput;
88

9-
trait InteractsWithConsole
9+
trait ArtisanHelpers
1010
{
1111
protected function runConsoleCommand($command, array $parameters = [])
1212
{

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\ArtisanHelpers;
1516
use Illuminated\Testing\Helpers\EmulatesEnvironment;
16-
use Illuminated\Testing\Helpers\InteractsWithConsole;
1717

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

2323
use ArtisanAsserts;
2424
use CollectionAsserts;

tests/Helpers/InteractsWithConsoleTest.php renamed to tests/Helpers/ArtisanHelpersTest.php

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

3-
class InteractsWithConsoleTest extends TestCase
3+
class ArtisanHelpersTest extends TestCase
44
{
55
/** @test */
66
public function it_can_run_console_command_by_class_name()

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\ArtisanHelpers;
1314
use Illuminated\Testing\Helpers\EmulatesEnvironment;
14-
use Illuminated\Testing\Helpers\InteractsWithConsole;
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, ArtisanHelpers::class);
2223
$this->assertTraitUsed(TestingTools::class, EmulatesEnvironment::class);
23-
$this->assertTraitUsed(TestingTools::class, InteractsWithConsole::class);
2424
}
2525

2626
/** @test */

0 commit comments

Comments
 (0)