Skip to content

Commit

Permalink
EZP-28959: Prevent publishing errors on pre-existing, undefined Custo…
Browse files Browse the repository at this point in the history
…m Tags (#2291)

* EZP-28959: Replaced validation error with deprecation notice due to BC

* EZP-28959: Aligned tests with the fix
  • Loading branch information
alongosz committed Mar 26, 2018
1 parent b7bf66e commit 5105714
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Repository/Tests/FieldType/RichTextIntegrationTest.php
Expand Up @@ -667,14 +667,7 @@ public function testCreateContentWithInvalidCustomTag(
$invalidXmlDocument = $this->createDocument($xmlDocumentPath);
$this->createContent(new RichTextValue($invalidXmlDocument));
} catch (ContentFieldValidationException $e) {
// get first nested ValidationError
/** @var \eZ\Publish\SPI\FieldType\ValidationError $error */
$error = current(current(current($e->getFieldErrors())));

self::assertEquals(
$expectedValidationMessage,
$error->getTranslatableMessage()->message
);
$this->assertValidationErrorOccurs($e, $expectedValidationMessage);

return;
}
Expand All @@ -690,10 +683,6 @@ public function testCreateContentWithInvalidCustomTag(
public function providerForTestCreateContentWithInvalidCustomTag()
{
$data = [
[
__DIR__ . '/_fixtures/ezrichtext/custom_tags/invalid/unknown_tag.xml',
"Unknown RichText Custom Tag 'unknown_tag'",
],
[
__DIR__ . '/_fixtures/ezrichtext/custom_tags/invalid/equation.xml',
"The attribute 'processor' of RichText Custom Tag 'equation' cannot be empty",
Expand Down

0 comments on commit 5105714

Please sign in to comment.