Skip to content

Commit

Permalink
Merge pull request #215 from alleyinteractive/release/1.0
Browse files Browse the repository at this point in the history
Preparing for 1.0 release and PHPUnit 10
  • Loading branch information
srtfisher authored Apr 5, 2024
2 parents 765f67e + 8b34285 commit afee539
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.x'
- '*.*.x'
pull_request:
schedule:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/node-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.x'
- '*.*.x'
pull_request:

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- '*.x'
- '*.*.x'
pull_request:
schedule:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vendor
composer.lock
bootstrap/cache
.phpunit.result.cache
.phpunit.cache/*
.phpcs/*.json

# Ignore temporary OS files
Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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,
Expand All @@ -41,8 +46,6 @@
}
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"bin/mantle package:discover",
Expand Down
18 changes: 9 additions & 9 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="general">
<directory prefix="test-" suffix=".php">tests</directory>
</testsuite>
</testsuites>
<testsuites>
<testsuite name="general">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Concern for creating the application instance.
*/
trait Create_Application {
trait CreateApplication {
/**
* Creates the application from the application instance.
*
Expand Down
4 changes: 2 additions & 2 deletions tests/class-test-case.php → tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit afee539

Please sign in to comment.