mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Updated SSViewerTest to test for SSTemplateParser rewrite_hash_links fix
This commit is contained in:
parent
6141930f15
commit
5258b84e5c
@ -1097,6 +1097,7 @@ after')
|
||||
<body>
|
||||
<a class="inline" href="#anchor">InlineLink</a>
|
||||
$InsertedLink
|
||||
<svg><use xlink:href="#sprite"></use></svg>
|
||||
<body>
|
||||
</html>');
|
||||
$tmpl = new SSViewer($tmplFile);
|
||||
@ -1111,7 +1112,12 @@ after')
|
||||
'<a class="inline" href="' . $base . '#anchor">InlineLink</a>',
|
||||
$result
|
||||
);
|
||||
|
||||
$this->assertContains(
|
||||
'<svg><use xlink:href="#sprite"></use></svg>',
|
||||
$result,
|
||||
'SSTemplateParser should only rewrite anchor hrefs'
|
||||
);
|
||||
|
||||
unlink($tmplFile);
|
||||
|
||||
Config::inst()->update('SSViewer', 'rewrite_hash_links', $orig);
|
||||
@ -1130,6 +1136,7 @@ after')
|
||||
<body>
|
||||
<a class="inline" href="#anchor">InlineLink</a>
|
||||
$InsertedLink
|
||||
<svg><use xlink:href="#sprite"></use></svg>
|
||||
<body>
|
||||
</html>');
|
||||
$tmpl = new SSViewer($tmplFile);
|
||||
@ -1145,6 +1152,11 @@ after')
|
||||
// '<a class="inline" href="<?php echo str_replace(',
|
||||
// $result
|
||||
// );
|
||||
$this->assertContains(
|
||||
'<svg><use xlink:href="#sprite"></use></svg>',
|
||||
$result,
|
||||
'SSTemplateParser should only rewrite anchor hrefs'
|
||||
);
|
||||
|
||||
unlink($tmplFile);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user