Skip to content
This repository was archived by the owner on Nov 6, 2022. It is now read-only.

Commit 7f978dd

Browse files
committed
Move PHPUnit tests to tests/unit, to distinguish between upcoming integration tests
Later, there should be integration tests, so prepare a separate space for them.
1 parent 50a6560 commit 7f978dd

Some content is hidden

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

42 files changed

+164
-173
lines changed

phpcs.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<file>.</file>
1313
<exclude-pattern>*/node_modules/*</exclude-pattern>
1414
<exclude-pattern>*/vendor/*</exclude-pattern>
15-
<exclude-pattern>*/tests/*</exclude-pattern>
1615
<exclude-pattern>*/package/*</exclude-pattern>
1716
<exclude-pattern>*.js</exclude-pattern>
1817
<exclude-pattern>*.css</exclude-pattern>

phpunit.xml.dist

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010

1111
<testsuites>
1212
<testsuite name="unit">
13-
<directory suffix=".php">./tests/php/helpers/</directory>
14-
<directory prefix="test-class-" suffix=".php">./tests/</directory>
13+
<directory suffix=".php">./tests/php/unit/helpers/</directory>
14+
<directory prefix="test-" suffix=".php">./tests/php/unit/</directory>
15+
</testsuite>
16+
17+
<testsuite name="integration">
18+
<directory suffix=".php">./tests/php/integration/</directory>
1519
</testsuite>
1620
</testsuites>
1721

tests/class-test-the-plugin.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/php/test-helpers.php

Lines changed: 0 additions & 129 deletions
This file was deleted.

tests/php/admin/test-class-import.php renamed to tests/php/unit/admin/test-class-import.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public function setUp() {
4343
parent::setUp();
4444
Monkey\setUp();
4545
$this->instance = new Admin\Import();
46-
$this->import_file_valid_json = dirname( dirname( __DIR__ ) ) . '/fixtures/mock-import-valid-format.txt';
47-
$this->import_file_invalid_json = dirname( dirname( __DIR__ ) ) . '/fixtures/mock-import-invalid-format.txt';
46+
$this->import_file_valid_json = dirname( __DIR__ ) . '/fixtures/mock-import-valid-format.txt';
47+
$this->import_file_invalid_json = dirname( __DIR__ ) . '/fixtures/mock-import-invalid-format.txt';
4848
$this->instance->set_plugin( block_lab() );
4949
}
5050

0 commit comments

Comments
 (0)