Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests namespacing #2

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
Loading