Skip to content

Commit

Permalink
Merge pull request #162 from jmolivas/twig-base-test
Browse files Browse the repository at this point in the history
Twig base test generator
  • Loading branch information
jmolivas committed Jul 16, 2014
2 parents 7860704 + 4658d67 commit 8ec143d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/Resources/skeleton/module/Tests/Controller/controller.php.twig
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
<?php
{% extends "base/class.php.twig" %}

/**
* @file
* Tests for {{module}}.module.
*/
{% block file_path %}
Drupal\{{module}}\Tests\{{ class_name }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{module}}\Tests;
{% endblock %}

{% block use_class %}
use Drupal\simpletest\WebTestBase;
{% endblock %}

{% block class_declaration %}
/**
* Provides automated tests for the {{module}} module.
*/
class {{class_name}}Test extends WebTestBase {
class {{class_name}}Test extends WebTestBase
{% endblock %}

{% block class_methods %}
public static function getInfo() {
return array(
'name' => "{{module}} {{class_name}}'s controller functionality",
Expand All @@ -33,5 +39,4 @@ class {{class_name}}Test extends WebTestBase {
//Check that the basic functions of module {{module}}.
$this->assertEqual(TRUE, TRUE, 'Test Unit Generated via App Console.');
}
}
{% endblock %}

0 comments on commit 8ec143d

Please sign in to comment.