Merge remote-tracking branch 'origin/3.0' into 3.1

This commit is contained in:
Ingo Schommer 2012-12-17 17:34:20 +01:00
commit 8dd9bf3a1e

View File

@ -55,16 +55,16 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
$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.');
$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('<img src="assets/example.jpg" alt="foo" title="bar" />');
$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.');
$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() {