diff --git a/.phpcs.xml b/.phpcs.xml index 8eee4b32..ca3aa55f 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -53,4 +53,8 @@ src/assets.php + + + tests/* + diff --git a/composer.json b/composer.json index 5cb3d4c5..ebb75f56 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,11 @@ }, "sort-packages": true }, + "autoload-dev": { + "psr-4": { + "Create_WordPress_Plugin\\Tests\\": "tests" + } + }, "extra": { "wordpress-autoloader": { "autoload": { diff --git a/phpunit.xml b/phpunit.xml index ab2a15ee..bde5ee00 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,10 +9,10 @@ > - tests/feature + tests/Feature - tests/unit + tests/Unit diff --git a/tests/feature/class-example-feature-test.php b/tests/Feature/ExampleFeatureTest.php similarity index 84% rename from tests/feature/class-example-feature-test.php rename to tests/Feature/ExampleFeatureTest.php index dc1dc376..aaad99db 100644 --- a/tests/feature/class-example-feature-test.php +++ b/tests/Feature/ExampleFeatureTest.php @@ -7,14 +7,14 @@ namespace Create_WordPress_Plugin\Tests\Feature; -use Create_WordPress_Plugin\Tests\Test_Case; +use Create_WordPress_Plugin\Tests\TestCase; /** * A test suite for an example feature. * * @link https://mantle.alley.com/testing/test-framework.html */ -class Example_Feature_Test extends Test_Case { +class ExampleFeatureTest extends TestCase { /** * An example test for the example feature. In practice, this should be updated to test an aspect of the feature. */ diff --git a/tests/class-test-case.php b/tests/TestCase.php similarity index 82% rename from tests/class-test-case.php rename to tests/TestCase.php index 21860cdd..483fc764 100644 --- a/tests/class-test-case.php +++ b/tests/TestCase.php @@ -12,6 +12,6 @@ /** * Create WordPress Plugin Base Test Case */ -abstract class Test_Case extends TestkitTest_Case { +abstract class TestCase extends TestkitTest_Case { } diff --git a/tests/unit/class-example-unit-test.php b/tests/Unit/ExampleUnitTest.php similarity index 91% rename from tests/unit/class-example-unit-test.php rename to tests/Unit/ExampleUnitTest.php index 133db087..a330fd15 100644 --- a/tests/unit/class-example-unit-test.php +++ b/tests/Unit/ExampleUnitTest.php @@ -14,7 +14,7 @@ * * @link https://mantle.alley.com/testing/test-framework.html */ -class Example_Unit_Test extends TestCase { +class ExampleUnitTest extends TestCase { /** * An example unit test. In practice, this should be updated to test a function in isolation. */