Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
54
vendor/chi-teck/drupal-code-generator/templates/d7/test.twig
vendored
Normal file
54
vendor/chi-teck/drupal-code-generator/templates/d7/test.twig
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Tests for {{ name }}.module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tests the functionality of the {{ name }} module.
|
||||
*/
|
||||
class {{ class }} extends DrupalWebTestCase {
|
||||
|
||||
/**
|
||||
* A user with permission to administer {{ machine_name }} configuration.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $admin_user;
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => '{{ name }}',
|
||||
'description' => 'Test description',
|
||||
'group' => '{{ machine_name }}',
|
||||
);
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp(array('{{ machine_name }}'));
|
||||
|
||||
// Create admin account.
|
||||
$this->admin_user = $this->drupalCreateUser(array('administer {{ machine_name }} configuration'));
|
||||
|
||||
$this->drupalLogin($this->admin_user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests configuration form.
|
||||
*/
|
||||
function testAdminForm() {
|
||||
$fields = array(
|
||||
'{{ machine_name }}_setting_1' => 'test',
|
||||
'{{ machine_name }}_setting_2' => 1,
|
||||
'{{ machine_name }}_setting_3' => 1,
|
||||
);
|
||||
$this->drupalPost('admin/config/system/{{ machine_name }}', $fields, t('Save configuration'));
|
||||
|
||||
$this->assertFieldByName('{{ machine_name }}_setting_1', 'test');
|
||||
$this->assertFieldByName('{{ machine_name }}_setting_2', 1);
|
||||
$this->assertFieldByName('{{ machine_name }}_setting_3', 1);
|
||||
$this->assertRaw(t('The configuration options have been saved.'));
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue