This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/drupal/console/templates/module/Tests/Controller/controller.php.twig
2018-11-23 12:29:20 +00:00

48 lines
1 KiB
Twig

{% extends "base/class.php.twig" %}
{% 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 {% endblock %}
{% block class_methods %}
/**
* {@inheritdoc}
*/
public static function getInfo() {
return [
'name' => "{{module}} {{class_name}}'s controller functionality",
'description' => 'Test Unit for module {{module}} and controller {{class_name}}.',
'group' => 'Other',
];
}
/**
* {@inheritdoc}
*/
public function setUp() {
parent::setUp();
}
/**
* Tests {{module}} functionality.
*/
public function test{{class_name}}() {
// Check that the basic functions of module {{module}}.
$this->assertEquals(TRUE, TRUE, 'Test Unit Generated via Drupal Console.');
}
{% endblock %}