Skip to content

Commit ff3f688

Browse files
jrfnlgrogy
authored andcommitted
Tests: re-organize test directory structure
* Move all existing test file in a `Unit` subdirectory as these are unit tests. This allows for more easily adding a second set of (integration) tests at a later point in time. * Let the subdirectory structure of the `tests\Unit` directory reflect the structure of the `src` directory. * Let the class names of the test files reflect the class name + method name of the method under test.
1 parent 6aa3b3e commit ff3f688

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

phpunit.xml.dist

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

1717
<testsuites>
1818
<testsuite name="Unittests">
19-
<directory suffix="Test.php">tests</directory>
19+
<directory suffix="Test.php">tests/Unit</directory>
2020
</testsuite>
2121
</testsuites>
2222

tests/SyntaxErrorNormalizeMessageTest.php renamed to tests/Unit/Errors/SyntaxErrorGetNormalizeMessageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace PHP_Parallel_Lint\PhpParallelLint\Tests;
3+
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit\Errors;
44

55
use PHP_Parallel_Lint\PhpParallelLint\Errors\SyntaxError;
66
use PHP_Parallel_Lint\PhpParallelLint\Tests\UnitTestCase;
77

8-
class SyntaxErrorNormalizeMessageTest extends UnitTestCase
8+
class SyntaxErrorGetNormalizeMessageTest extends UnitTestCase
99
{
1010
public function testInWordInErrorMessage()
1111
{

tests/ManagerRunTest.php renamed to tests/Unit/ManagerRunTest.php

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

3-
namespace PHP_Parallel_Lint\PhpParallelLint\Tests;
3+
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit;
44

55
use PHP_Parallel_Lint\PhpParallelLint\Manager;
66
use PHP_Parallel_Lint\PhpParallelLint\Outputs\TextOutput;

tests/OutputTest.php renamed to tests/Unit/Outputs/OutputTest.php

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

3-
namespace PHP_Parallel_Lint\PhpParallelLint\Tests;
3+
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit\Outputs;
44

55
use PHP_Parallel_Lint\PhpParallelLint\ErrorFormatter;
66
use PHP_Parallel_Lint\PhpParallelLint\Errors\ParallelLintError;

tests/ParallelLintLintTest.php renamed to tests/Unit/ParallelLintLintTest.php

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

3-
namespace PHP_Parallel_Lint\PhpParallelLint\Tests;
3+
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit;
44

55
use PHP_Parallel_Lint\PhpParallelLint\ParallelLint;
66
use PHP_Parallel_Lint\PhpParallelLint\Process\PhpExecutable;

tests/SkipLintProcessTest.php renamed to tests/Unit/Process/SkipLintProcessTest.php

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

3-
namespace PHP_Parallel_Lint\PhpParallelLint\Tests;
3+
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit\Process;
44

55
use PHP_Parallel_Lint\PhpParallelLint\Process\PhpExecutable;
66
use PHP_Parallel_Lint\PhpParallelLint\Process\SkipLintProcess;

tests/SettingsParseArgumentsTest.php renamed to tests/Unit/SettingsParseArgumentsTest.php

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

3-
namespace PHP_Parallel_Lint\PhpParallelLint\Tests;
3+
namespace PHP_Parallel_Lint\PhpParallelLint\Tests\Unit;
44

55
use PHP_Parallel_Lint\PhpParallelLint\Settings;
66
use PHP_Parallel_Lint\PhpParallelLint\Tests\UnitTestCase;

0 commit comments

Comments
 (0)