Added test to check text gen decodes HTML entities

This commit is contained in:
Dan Brown 2020-09-19 14:58:18 +01:00
parent 458aa72c2f
commit 2e39e45886
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -304,4 +304,18 @@ class PageContentTest extends TestCase
'level' => 3,
], $navMap[2]);
}
public function test_page_text_decodes_html_entities()
{
$page = Page::query()->first();
$this->actingAs($this->getAdmin())
->put($page->getUrl(''), [
'name' => 'Testing',
'html' => '<p>Hello &amp; welcome</p>',
]);
$page->refresh();
$this->assertEquals('Hello & welcome', $page->text);
}
}