diff --git a/tests/model/SiteTreeHTMLEditorFieldTest.php b/tests/model/SiteTreeHTMLEditorFieldTest.php
index 1df60d53..81481c16 100644
--- a/tests/model/SiteTreeHTMLEditorFieldTest.php
+++ b/tests/model/SiteTreeHTMLEditorFieldTest.php
@@ -53,18 +53,18 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$editor->setValue('');
$editor->saveInto($sitetree);
- $parser = new CSSContentParser($sitetree->Content);
- $xml = $parser->getByXpath('//img');
- $this->assertEquals('', $xml[0]['alt'], 'Alt tags are added by default.');
- $this->assertEquals('', $xml[0]['title'], 'Title tags are added by default.');
+ $parser = new CSSContentParser($sitetree->Content);
+ $xml = $parser->getByXpath('//img');
+ $this->assertEquals('', (string)$xml[0]['alt'], 'Alt tags are added by default.');
+ $this->assertEquals('', (string)$xml[0]['title'], 'Title tags are added by default.');
- $editor->setValue('');
- $editor->saveInto($sitetree);
+ $editor->setValue('');
+ $editor->saveInto($sitetree);
- $parser = new CSSContentParser($sitetree->Content);
- $xml = $parser->getByXpath('//img');
- $this->assertEquals('foo', $xml[0]['alt'], 'Alt tags are preserved.');
- $this->assertEquals('bar', $xml[0]['title'], 'Title tags are preserved.');
+ $parser = new CSSContentParser($sitetree->Content);
+ $xml = $parser->getByXpath('//img');
+ $this->assertEquals('foo', (string)$xml[0]['alt'], 'Alt tags are preserved.');
+ $this->assertEquals('bar', (string)$xml[0]['title'], 'Title tags are preserved.');
}
public function testImageTracking() {