Skip to content

Commit dbe7398

Browse files
committed
fix(tests): fix command test units location
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent c3db9df commit dbe7398

15 files changed

+18
-18
lines changed

tests/Command/AbstractCommandTestCase.php renamed to tests/Console/Command/AbstractCommandTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use Composer\Composer;
2222
use Composer\Package\RootPackageInterface;

tests/Command/CodeStyleCommandTest.php renamed to tests/Console/Command/CodeStyleCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\CodeStyleCommand;
2222
use PHPUnit\Framework\Attributes\CoversClass;
@@ -159,7 +159,7 @@ public function executeWithoutLocalConfigWillRunCodeStyleProcessWithDevToolsConf
159159
{
160160
$this->willRunProcessWithCallback(function (Process $process): bool {
161161
$commandLine = $process->getCommandLine();
162-
$path = \dirname(__DIR__, 2) . '/ecs.php';
162+
$path = getcwd() . '/ecs.php';
163163

164164
return str_contains($commandLine, 'vendor/bin/ecs')
165165
&& str_contains($commandLine, '--config=' . $path)
@@ -181,7 +181,7 @@ public function executeWithFixOptionWillRunCodeStyleProcessWithoutDryRunOption()
181181

182182
$this->willRunProcessWithCallback(function (Process $process): bool {
183183
$commandLine = $process->getCommandLine();
184-
$path = \dirname(__DIR__, 2) . '/ecs.php';
184+
$path = getcwd() . '/ecs.php';
185185

186186
return str_contains($commandLine, 'vendor/bin/ecs')
187187
&& str_contains($commandLine, '--config=' . $path)

tests/Command/CopyLicenseCommandTest.php renamed to tests/Console/Command/CopyLicenseCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\CopyLicenseCommand;
2222
use FastForward\DevTools\License\Generator;

tests/Command/DependenciesCommandTest.php renamed to tests/Console/Command/DependenciesCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\DependenciesCommand;
2222
use PHPUnit\Framework\Attributes\CoversClass;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\DocsCommand;
2222
use FastForward\DevTools\Composer\Json\ComposerJson;

tests/Command/GitAttributesCommandTest.php renamed to tests/Console/Command/GitAttributesCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Composer\Json\ComposerJson;
2222
use FastForward\DevTools\Console\Command\GitAttributesCommand;

tests/Command/GitIgnoreCommandTest.php renamed to tests/Console/Command/GitIgnoreCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\GitIgnoreCommand;
2222
use FastForward\DevTools\GitIgnore\GitIgnore;

tests/Command/PhpDocCommandTest.php renamed to tests/Console/Command/PhpDocCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Composer\Json\ComposerJson;
2222
use FastForward\DevTools\Console\Command\PhpDocCommand;

tests/Command/RefactorCommandTest.php renamed to tests/Console/Command/RefactorCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\RefactorCommand;
2222
use PHPUnit\Framework\Attributes\CoversClass;
@@ -106,7 +106,7 @@ public function executeWithoutLocalConfigWillRunRectorProcessWithDevToolsConfigF
106106

107107
$this->willRunProcessWithCallback(function (Process $process): bool {
108108
$commandLine = $process->getCommandLine();
109-
$path = \dirname(__DIR__, 2) . '/' . RefactorCommand::CONFIG;
109+
$path = getcwd() . '/' . RefactorCommand::CONFIG;
110110

111111
return str_contains($commandLine, 'vendor/bin/rector')
112112
&& str_contains($commandLine, 'process')

tests/Command/ReportsCommandTest.php renamed to tests/Console/Command/ReportsCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @see https://datatracker.ietf.org/doc/html/rfc2119
1717
*/
1818

19-
namespace FastForward\DevTools\Tests\Command;
19+
namespace FastForward\DevTools\Tests\Console\Command;
2020

2121
use FastForward\DevTools\Console\Command\ReportsCommand;
2222
use PHPUnit\Framework\Attributes\CoversClass;

0 commit comments

Comments
 (0)