diff options
| author | uwetews <uwe.tews@googlemail.com> | 2016-11-08 18:09:14 +0100 |
|---|---|---|
| committer | uwetews <uwe.tews@googlemail.com> | 2016-11-08 18:09:14 +0100 |
| commit | e867ae125e95ff629eb3b748eb222200f50e1769 (patch) | |
| tree | 061d9571441354c33d5c20131c543d0cda2651e3 /utilities | |
| parent | 7438ac39d0d1e8d979a74034f8242e918f6eab23 (diff) | |
| download | smarty-e867ae125e95ff629eb3b748eb222200f50e1769.tar.gz smarty-e867ae125e95ff629eb3b748eb222200f50e1769.tar.bz2 smarty-e867ae125e95ff629eb3b748eb222200f50e1769.zip | |
add utility to build Smarty_Internal_Testinstall
Diffstat (limited to 'utilities')
| -rw-r--r-- | utilities/BuildExpectedFiles.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/utilities/BuildExpectedFiles.php b/utilities/BuildExpectedFiles.php new file mode 100644 index 00000000..b6c368d8 --- /dev/null +++ b/utilities/BuildExpectedFiles.php @@ -0,0 +1,30 @@ +<?php +/** + * Created by PhpStorm. + * User: Uwe Tews + * Date: 25.10.2015 + * Time: 23:58 + */ +$sysplugins = array(); +$iterator = new DirectoryIterator(__DIR__ . '/../libs/sysplugins'); +foreach ($iterator as $file) { + if (!$file->isDot() && 'php' == $file->getExtension()) { + $filename = $file->getBasename(); + $sysplugins[ $filename ] = true; + } +} +$plugins = array(); +$iterator = new DirectoryIterator(__DIR__ . '/../libs/plugins'); +foreach ($iterator as $file) { + if (!$file->isDot() && 'php' == $file->getExtension()) { + $filename = $file->getBasename(); + $plugins[ $filename ] = true; + } +} +$code = file_get_contents(__DIR__ . '/../libs/sysplugins/smarty_internal_testinstall.php'); +$expectedPlugins = '$expectedPlugins = ' . var_export($plugins, true); +$code = preg_replace('#\$expectedPlugins =[^;]+#', $expectedPlugins, $code); +$expectedSysplugins = '$expectedSysplugins = ' . var_export($sysplugins, true); +$code = preg_replace('#\$expectedSysplugins =[^;]+#', $expectedSysplugins, $code); +file_put_contents(__DIR__ . '/../libs/sysplugins/smarty_internal_testinstall.php', $code); + |
