Skip to content
Browse files

Add ActionsExtensionTest

  • Loading branch information...
1 parent 7a5a6d3 commit 7defbc707e5f93f1019299510dab0b07ef124295 @noisebleed noisebleed committed Apr 1, 2012
Showing with 50 additions and 12 deletions.
  1. +3 −12 Extension/ActionsExtension.php
  2. +47 −0 Tests/Extension/ActionsExtensionTest.php
View
15 Extension/ActionsExtension.php
@@ -20,11 +20,9 @@
*
* @category NoiseLabs
* @package SmartyBundle
- * @author Vítor Brandão <noisebleed@noiselabs.org>
* @copyright (C) 2011-2012 Vítor Brandão <noisebleed@noiselabs.org>
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL-3
* @link http://www.noiselabs.org
- * @since 0.1.0
*/
namespace NoiseLabs\Bundle\SmartyBundle\Extension;
@@ -35,7 +33,9 @@
/**
* SmartyBundle extension for Symfony actions helper.
*
- * @since 0.1.0
+ * This extension tries to provide the same funcionality described in
+ * {@link http://symfony.com/doc/current/book/templating.html#embedding-controllers}.
+ *
* @author Vítor Brandão <noisebleed@noiselabs.org>
*/
class ActionsExtension extends AbstractExtension
@@ -44,9 +44,6 @@ class ActionsExtension extends AbstractExtension
/**
* Constructor.
- *
- * @since 0.1.0
- * @author Vítor Brandão <noisebleed@noiselabs.org>
*/
public function __construct(ContainerInterface $container)
{
@@ -55,9 +52,6 @@ public function __construct(ContainerInterface $container)
/**
* {@inheritdoc}
- *
- * @since 0.1.0
- * @author Vítor Brandão <noisebleed@noiselabs.org>
*/
public function getPlugins()
{
@@ -73,9 +67,6 @@ public function getPlugins()
*
* @see Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver::render()
* @see Symfony\Bundle\TwigBundle\Extension\ActionsExtension::renderAction()
- *
- * @since 0.1.0
- * @author Vítor Brandão <noisebleed@noiselabs.org>
*/
public function renderAction(array $parameters = array(), $controller = null, $template, &$repeat)
{
View
47 Tests/Extension/ActionsExtensionTest.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * This file is part of NoiseLabs-SmartyBundle
+ *
+ * NoiseLabs-SmartyBundle is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * NoiseLabs-SmartyBundle is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with NoiseLabs-SmartyBundle; if not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2011-2012 Vítor Brandão
+ *
+ * @category NoiseLabs
+ * @package SmartyBundle
+ * @copyright (C) 2011-2012 Vítor Brandão <noisebleed@noiselabs.org>
+ * @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL-3
+ * @link http://www.noiselabs.org
+ */
+
+namespace NoiseLabs\Bundle\SmartyBundle\Tests\Extension;
+
+use NoiseLabs\Bundle\SmartyBundle\Extension\ActionsExtension;
+use NoiseLabs\Bundle\SmartyBundle\Tests\TestCase;
+
+/**
+ * Test suite for the actions extension.
+ *
+ * @author Vítor Brandão <noisebleed@noiselabs.org>
+ */
+class ActionsExtensionTest extends TestCase
+{
+ public function testExtensionName()
+ {
+ $container = $this->createContainer();
+ $extension = new ActionsExtension($container);
+
+ $this->assertEquals('actions', $extension->getName());
+ }
+}

0 comments on commit 7defbc7

Please sign in to comment.
Something went wrong with that request. Please try again.