diff --git a/library/Zepto/ZeptoTwigExtension.php b/library/Zepto/Extension/Twig.php similarity index 80% rename from library/Zepto/ZeptoTwigExtension.php rename to library/Zepto/Extension/Twig.php index 492e833..904f53c 100644 --- a/library/Zepto/ZeptoTwigExtension.php +++ b/library/Zepto/Extension/Twig.php @@ -1,19 +1,18 @@ * @link http://https://github.com/hassankhan/Zepto * @license MIT * @since 0.6 */ -class ZeptoTwigExtension extends \Twig_Extension +class Twig extends \Twig_Extension { /** * I don't even know why this is here, but it is, so deal with it @@ -22,7 +21,7 @@ class ZeptoTwigExtension extends \Twig_Extension */ public function getName() { - return 'ZeptoTwigExtension'; + return 'Twig'; } /** @@ -42,26 +41,26 @@ public function getFunctions() /** * Returns a fully-qualified URL for a given filename in the 'content' directory * - * @see Zepto\Helper::url_for() + * @see \Zepto\Helper::url_for() * @param string $file_name * @return string|null */ public function url_for($file_name) { - $zepto = Zepto::instance(); + $zepto = \Zepto\Zepto::instance(); return $zepto->app['helper']->url_for($file_name); } /** * Returns a HTML for a given filename in the 'content' directory * - * @see Zepto\Helper::link_for() + * @see \Zepto\Helper::link_for() * @param string $file_name * @return string|null */ public function link_for($file_name) { - $zepto = Zepto::instance(); + $zepto = \Zepto\Zepto::instance(); return $zepto->app['helper']->link_for($file_name); } diff --git a/library/Zepto/Zepto.php b/library/Zepto/Zepto.php index 536da39..5c55ab0 100644 --- a/library/Zepto/Zepto.php +++ b/library/Zepto/Zepto.php @@ -127,7 +127,7 @@ function($app) { $twig = new \Twig_Environment( new \Twig_Loader_Filesystem($app['ROOT_DIR'] . 'templates') ); - $twig->addExtension(new ZeptoTwigExtension); + $twig->addExtension(new Extension\Twig); return $twig; } ); diff --git a/tests/Zepto/ZeptoTest.php b/tests/Zepto/ZeptoTest.php index 26b16ee..bda767c 100644 --- a/tests/Zepto/ZeptoTest.php +++ b/tests/Zepto/ZeptoTest.php @@ -161,7 +161,7 @@ public function testLoadPlugins() } /** - * @covers Zepto\Zepto::load_plugins() + * @covers Zepto\Zepto::load_plugins() * @dataProvider providerConfig */ public function testLoadPluginsWhenDisabled($config) @@ -227,7 +227,7 @@ public function testRunHooks() } /** - * @covers Zepto\Zepto::run_hooks + * @covers Zepto\Zepto::run_hooks * @dataProvider providerConfig */ public function testRunHooksReturnsFalseWhenPluginsAreDisabled($config) @@ -246,7 +246,6 @@ public function testRunHooksReturnsFalseWhenPluginsAreDisabled($config) public function testInstanceBeforeInitialization() { $this->assertNull(Zepto::instance()); - // $this->markTestIncomplete('Not yet implemented'); } /** @@ -257,7 +256,6 @@ public function testInstanceAfterInitialization() { $zepto = new Zepto(); $this->assertInstanceOf('Zepto\Zepto', Zepto::instance()); - // $this->markTestIncomplete('Not yet implemented'); } public function providerConfig()