storeDocument($file); $result = ShortcodeParser::get('default')->parse(sprintf( '
', $document->ID )); $value = Injector::inst()->create('HTMLValue', $result); $link = $value->query('//a')->item(0); $this->assertStringEndsWith("/dmsdocument/$document->ID", $link->getAttribute('href')); $this->assertEquals($document->getExtension(), $link->getAttribute('data-ext')); $this->assertEquals($document->getFileSizeFormatted(), $link->getAttribute('data-size')); } }