From ea2a2b4786bd5731e015f57ebe38b855408b2c28 Mon Sep 17 00:00:00 2001 From: Garion Herman Date: Thu, 14 Nov 2019 12:04:37 +1300 Subject: [PATCH] FIX Adjust HTMLEditorField tests to support alt attr changes in assets The default behaviour of the alt attribute has changed from using the filename to applying an empty value. --- tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php b/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php index 5bc41d591..97012e45b 100644 --- a/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php +++ b/tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php @@ -122,9 +122,9 @@ class HTMLEditorFieldTest extends FunctionalTest $parser = new CSSContentParser($obj->dbObject('Content')->forTemplate()); $xml = $parser->getByXpath('//img'); $this->assertEquals( - 'example', + '', (string)$xml[0]['alt'], - 'Alt tags are added by default based on filename' + 'Alt attribute is always present, even if empty' ); $this->assertEquals('', (string)$xml[0]['title'], 'Title tags are added by default.'); $this->assertEquals(10, (int)$xml[0]['width'], 'Width tag of resized image is set.'); @@ -180,7 +180,7 @@ class HTMLEditorFieldTest extends FunctionalTest $this->assertEquals( << - example + @@ -197,7 +197,7 @@ EOS $this->assertEquals( << - example +