public function testCreateRemoteAsset() { $asset = $this->object->createRemoteAsset('url', 'type'); $this->assertInstanceOf('\\Magento\\Framework\\View\\Asset\\Remote', $asset); $this->assertEquals('url', $asset->getUrl()); $this->assertEquals('type', $asset->getContentType()); }
/** * Add RSS element * * @param string $title * @param string $href * @return $this */ public function addRss($title, $href) { $remoteAsset = $this->assetRepo->createRemoteAsset((string)$href, 'unknown'); $this->pageAssets->add( "link/{$href}", $remoteAsset, ['attributes' => 'rel="alternate" type="application/rss+xml" title="' . $title . '"'] ); return $this; }