Fix file name and class case.
authorgicode <gicode@localhost>
Thu, 10 Nov 2011 23:52:56 +0000 (23:52 +0000)
committergicode <gicode@localhost>
Thu, 10 Nov 2011 23:52:56 +0000 (23:52 +0000)
Follow-up r102719

tests/phpunit/StructureTest.php [new file with mode: 0644]
tests/phpunit/structureTest.php [deleted file]
tests/phpunit/suite.xml

diff --git a/tests/phpunit/StructureTest.php b/tests/phpunit/StructureTest.php
new file mode 100644 (file)
index 0000000..eb16360
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * The tests here verify the structure of the code.  This is for outright bugs,
+ * not just style issues.
+ */
+
+class StructureTest extends MediaWikiTestCase {
+       /**
+        * Verify all files that appear to be tests have file names ending in
+        * Test.  If the file names do not end in Test, they will not be run.
+        */
+       public function testUnitTestFileNamesEndWithTest() {
+               $rootPath = escapeshellarg( __DIR__ );
+               $testClassRegex = implode( '|', array(
+                       'ApiFormatTestBase',
+                       'ApiTestCase',
+                       'MediaWikiLangTestCase',
+                       'MediaWikiTestCase',
+                       'PHPUnit_Framework_TestCase',
+               ) );
+               $testClassRegex = "^class .* extends ($testClassRegex)";
+               $finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
+                       " | xargs grep -El '$testClassRegex|function suite\('";
+
+               $results = null;
+               $exitCode = null;
+               exec($finder, $results, $exitCode);
+
+               $this->assertEquals(
+                       0,
+                       $exitCode,
+                       'Verify find/grep command succeeds.'
+               );
+
+               $results = array_filter(
+                       $results,
+                       array( $this, 'filterSuites' )
+               );
+
+               $this->assertEquals(
+                       array(),
+                       $results,
+                       'Unit test file names must end with Test.'
+               );
+       }
+
+       /**
+        * Filter to remove testUnitTestFileNamesEndWithTest false positives.
+        */
+       public function filterSuites( $filename ) {
+               return strpos( $filename, __DIR__ . '/suites/' ) !== 0;
+       }
+}
diff --git a/tests/phpunit/structureTest.php b/tests/phpunit/structureTest.php
deleted file mode 100644 (file)
index 27eb5e6..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * The tests here verify the structure of the code.  This is for outright bugs,
- * not just style issues. 
- */
-
-class structureTest extends MediaWikiTestCase {
-       /**
-        * Verify all files that appear to be tests have file names ending in
-        * Test.  If the file names do not end in Test, they will not be run.
-        */
-       public function testUnitTestFileNamesEndWithTest() {
-               $rootPath = escapeshellarg( __DIR__ );
-               $testClassRegex = implode( '|', array(
-                       'ApiFormatTestBase',
-                       'ApiTestCase',
-                       'MediaWikiLangTestCase',
-                       'MediaWikiTestCase',
-                       'PHPUnit_Framework_TestCase',
-               ) );
-               $testClassRegex = "^class .* extends ($testClassRegex)";
-               $finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
-                       " | xargs grep -El '$testClassRegex|function suite\('";
-
-               $results = null;
-               $exitCode = null;
-               exec($finder, $results, $exitCode);
-
-               $this->assertEquals(
-                       0,
-                       $exitCode,
-                       'Verify find/grep command succeeds.'
-               );
-
-               $results = array_filter(
-                       $results,
-                       array( $this, 'filterSuites' )
-               );
-
-               $this->assertEquals(
-                       array(),
-                       $results,
-                       'Unit test file names must end with Test.'
-               );
-       }
-
-       /**
-        * Filter to remove testUnitTestFileNamesEndWithTest false positives.
-        */
-       public function filterSuites( $filename ) {
-               return strpos( $filename, __DIR__ . '/suites/' ) !== 0;
-       }
-}
index 784b6d3..5c07cd4 100644 (file)
@@ -21,7 +21,7 @@
                        <directory>skins</directory>
                </testsuite>
                <testsuite name="structure">
-                       <file>structureTest.php</file>
+                       <file>StructureTest.php</file>
                </testsuite>
                <testsuite name="uploadfromurl">
                        <file>suites/UploadFromUrlTestSuite.php</file>