diff --git a/scripts/cms-any/license.php b/scripts/cms-any/license.php index a9f26bc..c7ada6b 100644 --- a/scripts/cms-any/license.php +++ b/scripts/cms-any/license.php @@ -41,10 +41,9 @@ foreach (['LICENSE.md', 'license.md', 'license'] as $filename) { rename_file_if_exists($filename, $licenseFilename); } - // only update licence contents if module is on silverstripe account if (module_account() === 'silverstripe') { - if (file_exists('LICENSE')) { + if (check_file_exists($licenseFilename)) { $oldContents = read_file($licenseFilename); $newContents = str_replace('SilverStripe', 'Silverstripe', $oldContents); if ($newContents !== $oldContents) { diff --git a/tests/ScriptsTest.php b/tests/ScriptsTest.php new file mode 100644 index 0000000..5a87a2b --- /dev/null +++ b/tests/ScriptsTest.php @@ -0,0 +1,24 @@ +assertFalse($found, "Script $script has file_exists() in it, use check_file_exists() instead"); + } + // need at least one assertion or phpunit says this is a risky test + $this->assertTrue(true); + } +}