diff --git a/tests/src/Functional/RedirectFormTest.php b/tests/src/ExistingSite/RedirectFormTest.php similarity index 67% rename from tests/src/Functional/RedirectFormTest.php rename to tests/src/ExistingSite/RedirectFormTest.php index 9bf99baf0..55aa13e28 100644 --- a/tests/src/Functional/RedirectFormTest.php +++ b/tests/src/ExistingSite/RedirectFormTest.php @@ -2,57 +2,36 @@ declare(strict_types=1); -namespace src\Functional; +namespace src\ExistingSite; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Url; use Drupal\helfi_platform_config\Entity\PublishableRedirect; -use Drupal\Tests\BrowserTestBase; -use Drupal\Tests\user\Traits\UserCreationTrait; +use Drupal\Tests\helfi_api_base\Functional\ExistingSiteTestBase; /** * Tests `redirect.add` form. + * + * @group helfi_platform_config */ -class RedirectFormTest extends BrowserTestBase { - - use UserCreationTrait; - - /** - * {@inheritdoc} - */ - protected $defaultTheme = 'stark'; +class RedirectFormTest extends ExistingSiteTestBase { /** - * {@inheritdoc} - */ - protected static $modules = [ - 'redirect', - 'helfi_platform_config', - ]; - - /** - * {@inheritDoc} + * Tests that saving redirect from entity form sets the custom field to TRUE. */ - protected function setUp() : void { - parent::setUp(); - + public function testRedirectForm() { $user = $this->createUser([ 'administer redirects', ]); $this->drupalLogin($user); - } - /** - * Tests that saving redirect from entity form sets the custom field to TRUE. - */ - public function testRedirectForm() { $edit = [ 'redirect_source[0][path]' => 'test', 'redirect_redirect[0][uri]' => '', 'status_code' => 307, ]; - $this->drupalGet(Url::fromRoute('redirect.add')->toString()); + $this->drupalGet(Url::fromRoute('redirect.add')); $this->submitForm($edit, 'Save'); $redirects = $this->container