Skip to content
Snippets Groups Projects
Verified Commit c75bd9de authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3463547 by catch: Use API methods instead of form submissions in...

Issue #3463547 by catch: Use API methods instead of form submissions in FilterFormatAccessTest::setUp()

(cherry picked from commit 1b3ff65f)
parent cbea2bb9
No related branches found
No related tags found
2 merge requests!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #250404 passed with warnings
Pipeline: drupal

#250409

    ......@@ -77,9 +77,6 @@ class FilterFormatAccessTest extends BrowserTestBase {
    */
    protected function setUp(): void {
    parent::setUp();
    $this->drupalPlaceBlock('page_title_block');
    $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
    // Create a user who can administer text formats, but does not have
    ......@@ -92,20 +89,16 @@ protected function setUp(): void {
    // Create three text formats. Two text formats are created for all users so
    // that the drop-down list appears for all tests.
    $this->drupalLogin($this->filterAdminUser);
    $formats = [];
    for ($i = 0; $i < 3; $i++) {
    $edit = [
    $format = FilterFormat::create([
    'format' => $this->randomMachineName(),
    'name' => $this->randomMachineName(),
    ];
    $this->drupalGet('admin/config/content/formats/add');
    $this->submitForm($edit, 'Save configuration');
    $this->resetFilterCaches();
    $formats[] = FilterFormat::load($edit['format']);
    ]);
    $format->save();
    $formats[] = $format;
    }
    [$this->allowedFormat, $this->secondAllowedFormat, $this->disallowedFormat] = $formats;
    $this->drupalLogout();
    // Create a regular user with access to two of the formats.
    $this->webUser = $this->drupalCreateUser([
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment