Browse Source

[TESTS] Fix some failing tests broken by restructuring and dependency updates

experimental
parent
commit
afa8443949
Signed by: diogo <mail@diogo.site> GPG Key ID: 18D2D35001FBFAB0
5 changed files with 8 additions and 7 deletions
  1. +1
    -1
      components/Feed/tests/FeedsTest.php
  2. +2
    -2
      components/Person/tests/PersonSettingsTest.php
  3. +2
    -1
      composer.json
  4. +2
    -2
      config/services.yaml
  5. +1
    -1
      tests/Controller/SecurityTest.php

tests/Controller/FeedsTest.php → components/Feed/tests/FeedsTest.php View File

@@ -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;

tests/Controller/UserPanelTest.php → components/Person/tests/PersonSettingsTest.php View File

@@ -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;


+ 2
- 1
composer.json View File

@@ -110,7 +110,8 @@
"App\\": "src/",
"Plugin\\": "plugins/",
"Component\\": "components/"
}
},
"exclude-from-classmap": ["/tests/"]
},
"autoload-dev": {
"psr-4": {


+ 2
- 2
config/services.yaml View File

@@ -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']


+ 1
- 1
tests/Controller/SecurityTest.php View File

@@ -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');
}
}

Loading…
Cancel
Save