diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index ab52834..573b664 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - '*.x' - '*.*.x' pull_request: schedule: diff --git a/.github/workflows/node-tests.yml b/.github/workflows/node-tests.yml index d693654..0dcee38 100644 --- a/.github/workflows/node-tests.yml +++ b/.github/workflows/node-tests.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - '*.x' - '*.*.x' pull_request: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ebbce8..0d2829b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - '*.x' - '*.*.x' pull_request: schedule: @@ -13,7 +14,7 @@ jobs: php-tests: strategy: matrix: - php: [8.0, 8.1, 8.2] + php: [8.1, 8.2] wordpress: ["latest"] multisite: [true, false] uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main diff --git a/.gitignore b/.gitignore index db2f956..d2014ca 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ vendor composer.lock bootstrap/cache .phpunit.result.cache +.phpunit.cache/* .phpcs/*.json # Ignore temporary OS files diff --git a/composer.json b/composer.json index 77176b5..4e042a5 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "alleyinteractive/mantle", - "type": "project", "description": "A site using the Mantle framework for WordPress", "license": "GPL-2.0-or-later", + "type": "project", "authors": [ { "name": "Alley", @@ -11,16 +11,21 @@ ], "require": { "alleyinteractive/composer-wordpress-autoloader": "^1.0", - "alleyinteractive/mantle-framework": "^0.12", + "alleyinteractive/mantle-framework": "^1.0", "fakerphp/faker": "^1.23" }, "require-dev": { "alleyinteractive/alley-coding-standards": "^2.0", - "nunomaduro/collision": "^6.4", "phpstan/phpstan": "1.10.66", - "phpunit/phpunit": "^9.6.10", "szepeviktor/phpstan-wordpress": "^1.3" }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, "config": { "allow-plugins": { "alleyinteractive/composer-wordpress-autoloader": true, @@ -41,8 +46,6 @@ } } }, - "minimum-stability": "dev", - "prefer-stable": true, "scripts": { "post-autoload-dump": [ "bin/mantle package:discover", diff --git a/phpunit.xml b/phpunit.xml index 0595632..9309ea6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,15 +1,15 @@ + - - - tests - - + + + tests + + diff --git a/tests/trait-create-application.php b/tests/CreateApplication.php similarity index 96% rename from tests/trait-create-application.php rename to tests/CreateApplication.php index 1aaf388..e4f6de6 100644 --- a/tests/trait-create-application.php +++ b/tests/CreateApplication.php @@ -13,7 +13,7 @@ /** * Concern for creating the application instance. */ -trait Create_Application { +trait CreateApplication { /** * Creates the application from the application instance. * diff --git a/tests/class-test-case.php b/tests/TestCase.php similarity index 61% rename from tests/class-test-case.php rename to tests/TestCase.php index 704b2b5..5479e08 100644 --- a/tests/class-test-case.php +++ b/tests/TestCase.php @@ -10,6 +10,6 @@ /** * Base Test Case that each Test Case should extend. */ -abstract class Test_Case extends \Mantle\Testing\Test_Case { - use Create_Application; +abstract class TestCase extends \Mantle\Testing\Test_Case { + use CreateApplication; } diff --git a/tests/feature/test-example.php b/tests/feature/ExampleTest.php similarity index 81% rename from tests/feature/test-example.php rename to tests/feature/ExampleTest.php index 354171a..900113f 100644 --- a/tests/feature/test-example.php +++ b/tests/feature/ExampleTest.php @@ -7,12 +7,12 @@ namespace App\Tests\Feature; -use App\Tests\Test_Case; +use App\Tests\TestCase; /** * Base Test Case that each Test Case should extend. */ -class Test_Example extends Test_Case { +class ExampleTest extends TestCase { public function test_example() { $this->assertTrue( true ); }