Commit b7168f97 authored by catch's avatar catch
Browse files

Issue #3466788 by mondrake, longwave: Fix ‘risky’ tests

parent 408df6b7
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -203,7 +203,9 @@ public function testInvalidPluginDefinitions(string $yaml, ?string $expected_exc
      $this->expectExceptionMessage($expected_message);
    }
    $container = $this->mockModuleInVfs('ckeditor5_invalid_plugin', $yaml, $additional_files);
    $container->get('plugin.manager.ckeditor5.plugin')->getDefinitions();
    $pluginManager = $container->get('plugin.manager.ckeditor5.plugin');
    $this->assertNotNull($pluginManager);
    $this->assertIsArray($pluginManager->getDefinitions());
  }

  /**
+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ public function testConstructor(array $elements, ?string $expected_exception_mes
      $this->expectException(\InvalidArgumentException::class);
      $this->expectExceptionMessage($expected_exception_message);
    }
    new HTMLRestrictions($elements);
    $restrictions = new HTMLRestrictions($elements);
    $this->assertIsArray($restrictions->getAllowedElements(FALSE));
  }

  public static function providerConstruct(): \Generator {
+1 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ public function testMinimumVersion($success, $minimum_version, $schema_version):
    $this->databaseContents['system'][0]['schema_version'] = $schema_version;
    $plugin = new TestDrupalSqlBase([], 'test', $this->pluginDefinition, $this->getMigration(), $this->state, $this->entityTypeManager);
    $plugin->setDatabase($this->getDatabase($this->databaseContents));
    $this->assertSame([], $plugin->fields());

    if (!$success) {
      $this->expectException(RequirementsException::class);
+1 −0
Original line number Diff line number Diff line
@@ -340,6 +340,7 @@ public function testGeneratedInvisiblePrimaryKey(): void {
      'type' => 'serial',
      'not null' => TRUE,
    ], ['primary key' => ['id']]);
    $this->assertTrue($this->schema->fieldExists('test_primary_key', 'id'));
  }

}
+1 −0
Original line number Diff line number Diff line
@@ -381,6 +381,7 @@ public function testUnsignedField(): void {
      'primary key' => ['order'],
    ];
    $this->schema->createTable($table_name, $table_spec);
    $this->assertTrue($this->schema->tableExists($table_name));
  }

}
Loading