Skip to content

Commit afee539

Browse files
authored
Merge pull request #215 from alleyinteractive/release/1.0
Preparing for 1.0 release and PHPUnit 10
2 parents 765f67e + 8b34285 commit afee539

File tree

9 files changed

+28
-21
lines changed

9 files changed

+28
-21
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- '*.x'
78
- '*.*.x'
89
pull_request:
910
schedule:

.github/workflows/node-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- '*.x'
78
- '*.*.x'
89
pull_request:
910

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- '*.x'
78
- '*.*.x'
89
pull_request:
910
schedule:
@@ -13,7 +14,7 @@ jobs:
1314
php-tests:
1415
strategy:
1516
matrix:
16-
php: [8.0, 8.1, 8.2]
17+
php: [8.1, 8.2]
1718
wordpress: ["latest"]
1819
multisite: [true, false]
1920
uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ vendor
88
composer.lock
99
bootstrap/cache
1010
.phpunit.result.cache
11+
.phpunit.cache/*
1112
.phpcs/*.json
1213

1314
# Ignore temporary OS files

composer.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "alleyinteractive/mantle",
3-
"type": "project",
43
"description": "A site using the Mantle framework for WordPress",
54
"license": "GPL-2.0-or-later",
5+
"type": "project",
66
"authors": [
77
{
88
"name": "Alley",
@@ -11,16 +11,21 @@
1111
],
1212
"require": {
1313
"alleyinteractive/composer-wordpress-autoloader": "^1.0",
14-
"alleyinteractive/mantle-framework": "^0.12",
14+
"alleyinteractive/mantle-framework": "^1.0",
1515
"fakerphp/faker": "^1.23"
1616
},
1717
"require-dev": {
1818
"alleyinteractive/alley-coding-standards": "^2.0",
19-
"nunomaduro/collision": "^6.4",
2019
"phpstan/phpstan": "1.10.66",
21-
"phpunit/phpunit": "^9.6.10",
2220
"szepeviktor/phpstan-wordpress": "^1.3"
2321
},
22+
"minimum-stability": "dev",
23+
"prefer-stable": true,
24+
"autoload-dev": {
25+
"psr-4": {
26+
"App\\Tests\\": "tests/"
27+
}
28+
},
2429
"config": {
2530
"allow-plugins": {
2631
"alleyinteractive/composer-wordpress-autoloader": true,
@@ -41,8 +46,6 @@
4146
}
4247
}
4348
},
44-
"minimum-stability": "dev",
45-
"prefer-stable": true,
4649
"scripts": {
4750
"post-autoload-dump": [
4851
"bin/mantle package:discover",

phpunit.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
<?xml version="1.0"?>
12
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24
bootstrap="tests/bootstrap.php"
35
backupGlobals="false"
46
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"
7+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
8+
cacheDirectory=".phpunit.cache"
99
>
10-
<testsuites>
11-
<testsuite name="general">
12-
<directory prefix="test-" suffix=".php">tests</directory>
13-
</testsuite>
14-
</testsuites>
10+
<testsuites>
11+
<testsuite name="general">
12+
<directory suffix="Test.php">tests</directory>
13+
</testsuite>
14+
</testsuites>
1515
</phpunit>

tests/trait-create-application.php renamed to tests/CreateApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Concern for creating the application instance.
1515
*/
16-
trait Create_Application {
16+
trait CreateApplication {
1717
/**
1818
* Creates the application from the application instance.
1919
*

tests/class-test-case.php renamed to tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
/**
1111
* Base Test Case that each Test Case should extend.
1212
*/
13-
abstract class Test_Case extends \Mantle\Testing\Test_Case {
14-
use Create_Application;
13+
abstract class TestCase extends \Mantle\Testing\Test_Case {
14+
use CreateApplication;
1515
}

tests/feature/test-example.php renamed to tests/feature/ExampleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
namespace App\Tests\Feature;
99

10-
use App\Tests\Test_Case;
10+
use App\Tests\TestCase;
1111

1212
/**
1313
* Base Test Case that each Test Case should extend.
1414
*/
15-
class Test_Example extends Test_Case {
15+
class ExampleTest extends TestCase {
1616
public function test_example() {
1717
$this->assertTrue( true );
1818
}

0 commit comments

Comments
 (0)