From ad49760c810af0c23cf52017f5f57f56f6658c72 Mon Sep 17 00:00:00 2001 From: gicode Date: Thu, 10 Nov 2011 23:45:35 +0000 Subject: [PATCH] Add test to catch the problem fixed in r102595. Confirmed the test works by removing "Test" from one of the test file names. --- tests/phpunit/structureTest.php | 53 +++++++++++++++++++++++++++++++++ tests/phpunit/suite.xml | 3 ++ 2 files changed, 56 insertions(+) create mode 100644 tests/phpunit/structureTest.php diff --git a/tests/phpunit/structureTest.php b/tests/phpunit/structureTest.php new file mode 100644 index 0000000000..27eb5e6198 --- /dev/null +++ b/tests/phpunit/structureTest.php @@ -0,0 +1,53 @@ +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/suite.xml b/tests/phpunit/suite.xml index eb52aa6e6b..784b6d38a5 100644 --- a/tests/phpunit/suite.xml +++ b/tests/phpunit/suite.xml @@ -20,6 +20,9 @@ skins + + structureTest.php + suites/UploadFromUrlTestSuite.php -- 2.20.1