Skip to content

Commit

Permalink
Merge pull request #2 from stellarwp/bugfix/use-proper-psr-structure-…
Browse files Browse the repository at this point in the history
…for-tests
  • Loading branch information
borkweb authored May 23, 2024
2 parents e90d0b5 + 5a0b94a commit 04cc09d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
},
"autoload-dev": {
"psr-4": {
"StellarWP\\SuperGlobals\\Tests\\": "tests/_support/",
"StellarWP\\SuperGlobals\\Tests\\Helper\\": "tests/_support/Helper/"
"StellarWP\\SuperGlobals\\Tests\\": "tests/"
}
},
"authors": [
Expand Down
32 changes: 18 additions & 14 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="tests/bootstrap.php" colors="true" cacheResultFile="tests/var/cache/.phpunit.result.cache">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<directory suffix=".php">vendor</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">tests/unit</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
cacheResultFile="tests/var/cache/.phpunit.result.cache">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<directory suffix=".php">vendor</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">tests/Unit</directory>
</testsuite>
</testsuites>
</phpunit>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
namespace StellarWP\SuperGlobals\Tests;

namespace StellarWP\SuperGlobals\Tests\Unit;

use PHPUnit\Framework\TestCase;
use StellarWP\SuperGlobals\SuperGlobals;

class SuperGlobalsTest extends TestCase {
final class SuperGlobalsTest extends TestCase {
/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<?php

require_once __DIR__ . '/TestCase.php';

0 comments on commit 04cc09d

Please sign in to comment.