diff --git a/tests/Controller/FeedsTest.php b/components/Feed/tests/FeedsTest.php similarity index 98% rename from tests/Controller/FeedsTest.php rename to components/Feed/tests/FeedsTest.php index e1cc06e646..e230c4faa1 100644 --- a/tests/Controller/FeedsTest.php +++ b/components/Feed/tests/FeedsTest.php @@ -21,7 +21,7 @@ declare(strict_types = 1); // }}} -namespace App\Tests\Controller; +namespace Component\Feed\Tests\Controller; use App\Core\DB\DB; use App\Core\Security; diff --git a/tests/Controller/UserPanelTest.php b/components/Person/tests/PersonSettingsTest.php similarity index 98% rename from tests/Controller/UserPanelTest.php rename to components/Person/tests/PersonSettingsTest.php index fb09d9bb2c..5ecee1a2b6 100644 --- a/tests/Controller/UserPanelTest.php +++ b/components/Person/tests/PersonSettingsTest.php @@ -21,14 +21,14 @@ declare(strict_types = 1); // }}} -namespace App\Tests\Controller; +namespace Component\Person\Tests; use App\Core\DB\DB; use App\Util\GNUsocialTestCase; use Functional as F; use Jchook\AssertThrows\AssertThrows; -class UserPanelTest extends GNUsocialTestCase +class PersonSettingsTest extends GNUsocialTestCase { use AssertThrows; diff --git a/composer.json b/composer.json index 2fc017cc49..af412b607b 100644 --- a/composer.json +++ b/composer.json @@ -110,7 +110,8 @@ "App\\": "src/", "Plugin\\": "plugins/", "Component\\": "components/" - } + }, + "exclude-from-classmap": ["/tests/"] }, "autoload-dev": { "psr-4": { diff --git a/config/services.yaml b/config/services.yaml index 45b5ac9d9f..17684b5530 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -45,11 +45,11 @@ services: Plugin\: resource: '../plugins/*' - exclude: '../plugins/*/{scripts,classes,lib,actions,locale,doc}' + exclude: '../plugins/*/{scripts,classes,lib,actions,locale,doc,tests}' tags: ['controller.service_arguments'] Component\: resource: '../components/*' - exclude: '../components/*/{scripts,classes,lib,actions,locale,doc}' + exclude: '../components/*/{scripts,classes,lib,actions,locale,doc,tests}' tags: ['controller.service_arguments'] diff --git a/tests/Controller/SecurityTest.php b/tests/Controller/SecurityTest.php index 822363e918..e8a2d3f6f7 100644 --- a/tests/Controller/SecurityTest.php +++ b/tests/Controller/SecurityTest.php @@ -180,7 +180,7 @@ class SecurityTest extends GNUsocialTestCase public function testRegisterExistingEmail() { - [$client, ] = self::testRegister('other_new_nickname', 'email@provider.any', 'foobar'); + [$client, ] = self::testRegister('other_new_nickname', 'taken_user@provider.any', 'foobar'); $this->assertSelectorTextContains('.stacktrace', 'App\Util\Exception\EmailTakenException'); } }