Permalink
Browse files

Merge remote-tracking branch 'gh-matason/7.x-1.x' into 7.x-1.x

* gh-matason/7.x-1.x:
  Move Unit test case under Simpletest.
  Removing old files.
  Split Test Skeleton into Web test and Unit test commands.
  • Loading branch information...
2 parents ec6ec3f + d8fe9e1 commit 31755431b7ecf6bb90eae7d87d20e01218e5dd3e @webflo webflo committed Jun 3, 2012
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env php
+&lt;?php
+require $_SERVER['TM_BUNDLE_SUPPORT'] . '/bootstrap.php';
+include textmate_find_command('unit_test_skeleton');</string>
+ <key>input</key>
+ <string>none</string>
+ <key>name</key>
+ <string>Unit test skeleton</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.php</string>
+ <key>tabTrigger</key>
+ <string>unittestcase</string>
+ <key>uuid</key>
+ <string>B5446765-0015-48A5-8049-C4E8E1585FFB</string>
+</dict>
+</plist>
@@ -8,18 +8,18 @@
<string>#!/usr/bin/env php
&lt;?php
require $_SERVER['TM_BUNDLE_SUPPORT'] . '/bootstrap.php';
-include textmate_find_command('test_skeleton');
+include textmate_find_command('web_test_skeleton');
</string>
<key>input</key>
<string>none</string>
<key>name</key>
- <string>Test skeleton</string>
+ <string>Web test skeleton</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.php</string>
<key>tabTrigger</key>
- <string>testcase</string>
+ <string>webtestcase</string>
<key>uuid</key>
<string>BF0699C6-ED5B-4E1D-BAFA-DE108CFD0B5C</string>
</dict>
@@ -100,7 +100,7 @@ function textmate_find_command($name) {
$name = str_replace('schema_', '', $name);
}
- elseif (strpos($name, 'test_') === 0) {
+ elseif (strpos($name, 'unit_test_') === 0 || strpos($name, 'web_test_') === 0) {
$folder = 'simpletest/';
}
@@ -0,0 +1,15 @@
+class ${1:<?php print ucfirst($basename); ?>}TestCase extends DrupalUnitTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => t('${1} tests'),
+ 'description' => t('${3:One or more complete sentences explaining the test.}'),
+ 'group' => t('${1}'),
+ );
+ }
+
+ function setUp() {
+ parent::setUp('${1/(\w+)/(?1:\L$0)/g}'$6);
+ }
+
+ $0
+}
@@ -0,0 +1,15 @@
+class ${1:<?php print ucfirst($basename); ?>}TestCase extends DrupalUnitTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => t('${1} tests'),
+ 'description' => t('${3:One or more complete sentences explaining the test.}'),
+ 'group' => t('${1}'),
+ );
+ }
+
+ function setUp() {
+ parent::setUp('${1/(\w+)/(?1:\L$0)/g}'$6);
+ }
+
+ $0
+}
View
@@ -858,6 +858,7 @@
<key>items</key>
<array>
<string>BF0699C6-ED5B-4E1D-BAFA-DE108CFD0B5C</string>
+ <string>B5446765-0015-48A5-8049-C4E8E1585FFB</string>
</array>
<key>name</key>
<string>Simpletest</string>

0 comments on commit 3175543

Please sign in to comment.