Skip to content

Commit

Permalink
Preparing for 1.0 release and PHPUnit 10
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Nov 30, 2023
1 parent 6569ae8 commit 1405da1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":[],"times":{"App\\Tests\\Feature\\ExampleTest::test_example":0.001,"App\\Tests\\Feature\\ExampleTest::test_route":0.029}}
17 changes: 11 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,23 @@
],
"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",
"nunomaduro/collision": "^7.0",
"phpstan/phpstan": "1.10.15",
"phpunit/phpunit": "^9.6.10",
"phpunit/phpunit": "^9.3.3 || ^10.4.2",
"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 +48,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 1405da1

Please sign in to comment.