for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Leogout\Bundle\SeoBundle\Tests\Model;
use Leogout\Bundle\SeoBundle\Model\LinkTag;
use Leogout\Bundle\SeoBundle\Tests\TestCase;
/**
* Description of LinkTagTest.
*
* @author: leogout
*/
class LinkTagTest extends TestCase
{
public function testRenderAll()
$linkTag = new LinkTag();
$linkTag
->setHref('http://symfony.com/blog')
->setRel('alternate')
->setType('application/rss+xml')
->setTitle('RSS');
$this->assertEquals(
'<link href="http://symfony.com/blog" rel="alternate" type="application/rss+xml" title="RSS" />',
$linkTag->render()
);
}
public function testRenderHrefAndRel()
->setRel('alternate');
'<link href="http://symfony.com/blog" rel="alternate" />',
public function testRenderTypeAndTitle()
'<link type="application/rss+xml" title="RSS" />',
public function testRenderNothing()
'<link />',