Skip to content

Commit

Permalink
[Tests] Improved CustomTagsValidatorTest and RichTextTest code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Sep 18, 2024
1 parent 7044bbc commit 5505205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function configureAndLoad(array $configurationValues = [])

$extensionAlias = $extension->getAlias();
// when loading extension, pass only relevant configuration
$extensionConfig = isset($configs[$extensionAlias]) ? $configs[$extensionAlias] : [];
$extensionConfig = $configs[$extensionAlias] ?? [];

$extension->load([$extensionConfig], $this->container);
}
Expand Down
13 changes: 3 additions & 10 deletions tests/lib/RichText/Validator/CustomTagsValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@
use Symfony\Component\Yaml\Yaml;

/**
* Test RichText CustomTagsValidator.
*
* @see \Ibexa\FieldTypeRichText\FieldType\RichText\CustomTagsValidator
* @covers \Ibexa\FieldTypeRichText\FieldType\RichText\CustomTagsValidator
*/
class CustomTagsValidatorTest extends TestCase
final class CustomTagsValidatorTest extends TestCase
{
/**
* @var \Ibexa\FieldTypeRichText\RichText\Validator\CustomTagsValidator
*/
private $validator;
private CustomTagsValidator $validator;

public function setUp(): void
{
Expand All @@ -37,8 +32,6 @@ public function setUp(): void
/**
* Test validating DocBook document containing Custom Tags.
*
* @covers \Ibexa\FieldTypeRichText\RichText\CustomTagsValidator::validateDocument
*
* @dataProvider providerForTestValidateDocument
*
* @param \DOMDocument $document
Expand Down

0 comments on commit 5505205

Please sign in to comment.