diff --git a/tests/api/XMLDataFormatterTest.php b/tests/api/XMLDataFormatterTest.php
index 414cce108..cca690fec 100644
--- a/tests/api/XMLDataFormatterTest.php
+++ b/tests/api/XMLDataFormatterTest.php
@@ -39,7 +39,7 @@ class XMLDataFormatterTest extends SapphireTest {
$this->assertEquals(
'mysite.com is a link in this HTML content.'
. ' ',
- (string) $xml->Content
+ (string)$xml->Content
);
}
@@ -50,16 +50,16 @@ class XMLDataFormatterTest extends SapphireTest {
$page->Content = 'This is some test content [test_shortcode]test[/test_shortcode]';
$xml = new SimpleXMLElement('' . $formatter->convertDataObjectWithoutHeader($page));
- $this->assertEquals('This is some test content test', $xml->Content);
+ $this->assertEquals('This is some test content test', (string)$xml->Content);
$page->Content = '[test_shortcode,id=-1]';
$xml = new SimpleXMLElement('' . $formatter->convertDataObjectWithoutHeader($page));
- $this->assertEmpty('', $xml->Content);
+ $this->assertEmpty('', (string)$xml->Content);
$page->Content = '[bad_code,id=1]';
$xml = new SimpleXMLElement('' . $formatter->convertDataObjectWithoutHeader($page));
- $this->assertContains('[bad_code,id=1]', $xml->Content);
+ $this->assertContains('[bad_code,id=1]', (string)$xml->Content);
}
/**
diff --git a/tests/forms/HtmlEditorFieldTest.php b/tests/forms/HtmlEditorFieldTest.php
index cb11563ea..9d55226d3 100644
--- a/tests/forms/HtmlEditorFieldTest.php
+++ b/tests/forms/HtmlEditorFieldTest.php
@@ -46,16 +46,16 @@ class HtmlEditorFieldTest extends FunctionalTest {
$parser = new CSSContentParser($obj->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.');
+ $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($obj);
$parser = new CSSContentParser($obj->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.');
+ $this->assertEquals('foo', (string)$xml[0]['alt'], 'Alt tags are preserved.');
+ $this->assertEquals('bar', (string)$xml[0]['title'], 'Title tags are preserved.');
}
public function testMultiLineSaving() {