branch: elpa/drupal-mode
commit dcea92f3a977404f3089ef906ace604e2773e889
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Added autoinsert skeleton for .test files.
---
drupal/autoinsert.el | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/drupal/autoinsert.el b/drupal/autoinsert.el
index 0cfd9b8486..751bbdcaa6 100644
--- a/drupal/autoinsert.el
+++ b/drupal/autoinsert.el
@@ -1,6 +1,6 @@
;;; drupal/autoinsert.el --- Drupal-mode support for `auto-insert-mode'
-;; Copyright (C) 2012 Arne Jørgensen
+;; Copyright (C) 2012, 2013 Arne Jørgensen
;; Author: Arne Jørgensen <[email protected]>
;; Keywords:
@@ -29,6 +29,7 @@
(define-auto-insert '("\\.info" . "Drupal info file")
'drupal/autoinsert-insert-info-skeleton)
(define-auto-insert '("\\.module" . "Drupal module file")
'drupal/autoinsert-insert-module-skeleton)
(define-auto-insert '("\\.install" . "Drupal install file")
'drupal/autoinsert-insert-install-skeleton)
+(define-auto-insert '("\\.test" . "Drupal test file")
'drupal/autoinsert-insert-test-skeleton)
(define-skeleton drupal/autoinsert-insert-info-skeleton
"Drupal info file skeleton."
@@ -70,6 +71,30 @@
" */\n"
@ - "\n")
+(define-skeleton drupal/autoinsert-insert-test-skeleton
+ "Drupal test file skeleton."
+ nil
+ "<?php\n"
+ "\n"
+ "/**\n"
+ " * @file\n"
+ " * Tests for " (drupal-module-name) ".module.\n"
+ " */\n"
+ "\n"
+ "/**\n"
+ " * Helper class for module test cases.\n"
+ " */\n"
+ "class " (remove ?_ (capitalize (drupal-module-name))) "WebTestCase extends
DrupalWebTestCase {\n"
+ @ - "\n"
+ "}\n"
+ "\n"
+ "/**\n"
+ " * Helper class for module test cases.\n"
+ " */\n"
+ "class " (remove ?_ (capitalize (drupal-module-name))) "UnitTestCase extends
DrupalUnitTestCase {\n"
+ @ - "\n"
+ "}\n")
+
(provide 'drupal/autoinsert)