Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Added test class for Zepto\Extension\Twig and updated test class …
Browse files Browse the repository at this point in the history
…for ``Zepto\Zepto``
  • Loading branch information
hassankhan committed Feb 13, 2014
1 parent de5c631 commit 4238744
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
2 changes: 2 additions & 0 deletions library/Zepto/Extension/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function getFunctions()
* @see \Zepto\Helper::url_for()
* @param string $file_name
* @return string|null
* @codeCoverageIgnore
*/
public function url_for($file_name)
{
Expand All @@ -57,6 +58,7 @@ public function url_for($file_name)
* @see \Zepto\Helper::link_for()
* @param string $file_name
* @return string|null
* @codeCoverageIgnore
*/
public function link_for($file_name)
{
Expand Down
64 changes: 64 additions & 0 deletions tests/Zepto/Extension/TwigTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
namespace Zepto\Extension;

/**
* Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2014-02-14 at 20:44:07.
*/
class TwigTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \Zepto\Extension\Twig
*/
protected $twig;

/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
$this->twig = new Twig();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Zepto\Extension\Twig::getName
*/
public function testGetName()
{
$this->assertEquals('Twig', $this->twig->getName());
}

/**
* @covers Zepto\Extension\Twig::getFunctions
*/
public function testGetFunctions()
{
$this->assertContainsOnly('Twig_SimpleFunction', $this->twig->getFunctions());
// $this->twig->write('', 'Test content');
}

/**
* @covers Zepto\Extension\Twig::url_for
*/
public function testUrlFor()
{
$this->markTestIncomplete('Not yet implemented');
}

/**
* @covers Zepto\Extension\Twig::link_for
*/
public function testLinkFor()
{
$this->markTestIncomplete('Not yet implemented');
}

}
1 change: 0 additions & 1 deletion tests/Zepto/ZeptoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ public function testInstanceBeforeInitialization()

/**
* @covers Zepto\Zepto::instance()
* @runInSeparateProcess
*/
public function testInstanceAfterInitialization()
{
Expand Down

0 comments on commit 4238744

Please sign in to comment.