Skip to content

Commit 9693025

Browse files
committed
refactor: reorganize tests code
1 parent 5ef5fa7 commit 9693025

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+8
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"psr-4": {
5151
"Inpsyde\\CodingStandard\\Tests\\": [
5252
"tests/src/",
53-
"tests/cases/",
53+
"tests/unit/",
5454
"tests/e2e/"
5555
]
5656
}

phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
</coverage>
1212
<testsuites>
1313
<testsuite name="fixtures">
14-
<file>tests/cases/FixturesTest.php</file>
14+
<file>tests/unit/cases/FixturesTest.php</file>
1515
</testsuite>
1616
<testsuite name="helpers">
17-
<directory>tests/cases/Helpers</directory>
17+
<directory>tests/unit/cases/Helpers</directory>
1818
</testsuite>
1919
<testsuite name="e2e">
20-
<directory>tests/e2e/E2eTest.php</directory>
20+
<directory>tests/e2e/cases</directory>
2121
</testsuite>
2222
</testsuites>
2323
</phpunit>

tests/bootstrap.php

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

3838
putenv("LIB_PATH={$libDir}");
3939
putenv('SNIFFS_NAMESPACE=Inpsyde\\Sniffs');
40-
putenv("FIXTURES_PATH={$testsDir}/fixtures");
40+
putenv("FIXTURES_PATH={$testsDir}/unit/fixtures");
4141

4242
if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
4343
define('PHPUNIT_COMPOSER_INSTALL', $autoload);

tests/e2e/E2eTest.php renamed to tests/e2e/cases/E2eTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Inpsyde\CodingStandard\Tests;
5+
namespace Inpsyde\CodingStandard\Tests\cases;
66

7+
use Inpsyde\CodingStandard\Tests\TestCase;
78
use RuntimeException;
89

910
class E2eTest extends TestCase
@@ -14,7 +15,7 @@ class E2eTest extends TestCase
1415
protected function setUp(): void
1516
{
1617
$libPath = (string) getenv('LIB_PATH');
17-
$this->testPackagePath = $libPath . '/tests/e2e/test-package';
18+
$this->testPackagePath = $libPath . '/tests/e2e/fixtures/test-package';
1819
$this->phpCsBinary = $libPath . '/vendor/bin/phpcs';
1920
}
2021

File renamed without changes.

0 commit comments

Comments
 (0)