mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Add test for shortcode parsing with querystring and anchor
This commit is contained in:
parent
0491ca03cf
commit
d116b9a8d2
@ -311,6 +311,15 @@ class ShortcodeParserTest extends SapphireTest
|
||||
$this->assertEquals($this->extra['element']->tagName, 'a');
|
||||
}
|
||||
|
||||
public function testShortcodeWithAnchorAndQuerystring()
|
||||
{
|
||||
$result = $this->parser->parse('<a href="[test_shortcode]?my-string=this&thing=2#my-anchor">Link</a>');
|
||||
|
||||
$this->assertContains('my-string=this', $result);
|
||||
$this->assertContains('thing=2', $result);
|
||||
$this->assertContains('my-anchor', $result);
|
||||
}
|
||||
|
||||
public function testNoParseAttemptIfNoCode()
|
||||
{
|
||||
$stub = $this->getMockBuilder(ShortcodeParser::class)->setMethods(array('replaceElementTagsWithMarkers'))
|
||||
|
Loading…
Reference in New Issue
Block a user