Skip to content

Commit dcea92f

Browse files
committed
Added autoinsert skeleton for .test files.
1 parent 71f3ba7 commit dcea92f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

drupal/autoinsert.el

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; drupal/autoinsert.el --- Drupal-mode support for `auto-insert-mode'
22

3-
;; Copyright (C) 2012 Arne Jørgensen
3+
;; Copyright (C) 2012, 2013 Arne Jørgensen
44

55
;; Author: Arne Jørgensen <[email protected]>
66
;; Keywords:
@@ -29,6 +29,7 @@
2929
(define-auto-insert '("\\.info" . "Drupal info file") 'drupal/autoinsert-insert-info-skeleton)
3030
(define-auto-insert '("\\.module" . "Drupal module file") 'drupal/autoinsert-insert-module-skeleton)
3131
(define-auto-insert '("\\.install" . "Drupal install file") 'drupal/autoinsert-insert-install-skeleton)
32+
(define-auto-insert '("\\.test" . "Drupal test file") 'drupal/autoinsert-insert-test-skeleton)
3233

3334
(define-skeleton drupal/autoinsert-insert-info-skeleton
3435
"Drupal info file skeleton."
@@ -70,6 +71,30 @@
7071
" */\n"
7172
@ - "\n")
7273

74+
(define-skeleton drupal/autoinsert-insert-test-skeleton
75+
"Drupal test file skeleton."
76+
nil
77+
"<?php\n"
78+
"\n"
79+
"/**\n"
80+
" * @file\n"
81+
" * Tests for " (drupal-module-name) ".module.\n"
82+
" */\n"
83+
"\n"
84+
"/**\n"
85+
" * Helper class for module test cases.\n"
86+
" */\n"
87+
"class " (remove ?_ (capitalize (drupal-module-name))) "WebTestCase extends DrupalWebTestCase {\n"
88+
@ - "\n"
89+
"}\n"
90+
"\n"
91+
"/**\n"
92+
" * Helper class for module test cases.\n"
93+
" */\n"
94+
"class " (remove ?_ (capitalize (drupal-module-name))) "UnitTestCase extends DrupalUnitTestCase {\n"
95+
@ - "\n"
96+
"}\n")
97+
7398

7499

75100
(provide 'drupal/autoinsert)

0 commit comments

Comments
 (0)