diff --git a/autoload.php b/autoload.php index ca3010b62..3f223a024 100755 --- a/autoload.php +++ b/autoload.php @@ -1,5 +1,5 @@ * @version SVN: $Id$ */ -require_once dirname(__FILE__).'/../../lib/task/sfFilesystem.class.php'; +require_once __DIR__.'/../../lib/task/sfFilesystem.class.php'; if (!isset($argv[1])) { diff --git a/data/bin/release.php b/data/bin/release.php index 571c2bb36..366510b48 100644 --- a/data/bin/release.php +++ b/data/bin/release.php @@ -17,10 +17,10 @@ * @author Fabien Potencier * @version SVN: $Id$ */ -require_once(dirname(__FILE__).'/../../lib/exception/sfException.class.php'); -require_once(dirname(__FILE__).'/../../lib/task/sfFilesystem.class.php'); -require_once(dirname(__FILE__).'/../../lib/util/sfFinder.class.php'); -require_once(dirname(__FILE__).'/../../lib/vendor/lime/lime.php'); +require_once(__DIR__.'/../../lib/exception/sfException.class.php'); +require_once(__DIR__.'/../../lib/task/sfFilesystem.class.php'); +require_once(__DIR__.'/../../lib/util/sfFinder.class.php'); +require_once(__DIR__.'/../../lib/vendor/lime/lime.php'); if (!isset($argv[1])) { diff --git a/data/bin/sandbox_installer.php b/data/bin/sandbox_installer.php index 57569566b..f503e0a03 100644 --- a/data/bin/sandbox_installer.php +++ b/data/bin/sandbox_installer.php @@ -1,12 +1,12 @@ installDir(dirname(__FILE__).'/sandbox_skeleton'); +$this->installDir(__DIR__.'/sandbox_skeleton'); $this->logSection('install', 'add symfony CLI for Windows users'); -$this->getFilesystem()->copy(dirname(__FILE__).'/symfony.bat', sfConfig::get('sf_root_dir').'/symfony.bat'); +$this->getFilesystem()->copy(__DIR__.'/symfony.bat', sfConfig::get('sf_root_dir').'/symfony.bat'); $this->logSection('install', 'add LICENSE'); -$this->getFilesystem()->copy(dirname(__FILE__).'/../../LICENSE', sfConfig::get('sf_root_dir').'/LICENSE'); +$this->getFilesystem()->copy(__DIR__.'/../../LICENSE', sfConfig::get('sf_root_dir').'/LICENSE'); $this->logSection('install', 'default to sqlite'); $this->runTask('configure:database', sprintf("'sqlite:%s/sandbox.db'", sfConfig::get('sf_data_dir'))); diff --git a/data/bin/symfony b/data/bin/symfony index b45db0907..e8ccac14e 100755 --- a/data/bin/symfony +++ b/data/bin/symfony @@ -17,10 +17,10 @@ if (file_exists('config/ProjectConfiguration.class.php')) } else { - if (is_readable(dirname(__FILE__).'/../../lib/autoload/sfCoreAutoload.class.php')) + if (is_readable(__DIR__.'/../../lib/autoload/sfCoreAutoload.class.php')) { // SVN - $dir = realpath(dirname(__FILE__).'/../../lib'); + $dir = realpath(__DIR__.'/../../lib'); } else { diff --git a/lib/autoload/sfCoreAutoload.class.php b/lib/autoload/sfCoreAutoload.class.php index 0243ba123..abf8bcd25 100644 --- a/lib/autoload/sfCoreAutoload.class.php +++ b/lib/autoload/sfCoreAutoload.class.php @@ -36,7 +36,7 @@ class sfCoreAutoload protected function __construct() { - $this->baseDir = realpath(dirname(__FILE__).'/..'); + $this->baseDir = realpath(__DIR__.'/..'); } /** @@ -141,7 +141,7 @@ public function getBaseDir() */ static public function make() { - $libDir = str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..')); + $libDir = str_replace(DIRECTORY_SEPARATOR, '/', realpath(__DIR__.DIRECTORY_SEPARATOR.'..')); require_once $libDir.'/util/sfFinder.class.php'; $files = sfFinder::type('file') diff --git a/lib/cache/sfCache.class.php b/lib/cache/sfCache.class.php index eb49f8f09..af2c89091 100644 --- a/lib/cache/sfCache.class.php +++ b/lib/cache/sfCache.class.php @@ -57,7 +57,7 @@ public function initialize($options = array()) $this->options = array_merge(array( 'automatic_cleaning_factor' => 1000, 'lifetime' => 86400, - 'prefix' => md5(dirname(__FILE__)), + 'prefix' => md5(__DIR__), ), $options); $this->options['prefix'] .= self::SEPARATOR; diff --git a/lib/command/cli.php b/lib/command/cli.php index 09a87e415..37a4f635d 100644 --- a/lib/command/cli.php +++ b/lib/command/cli.php @@ -9,15 +9,15 @@ */ // Try autoloading using composer if available. -if (!file_exists($autoload = dirname(__FILE__).'/../../../../autoload.php')) +if (!file_exists($autoload = __DIR__.'/../../../../autoload.php')) { - $autoload = dirname(__FILE__).'/../../autoload.php'; + $autoload = __DIR__.'/../../autoload.php'; } // Fall back to classic Symfony loading if (!file_exists($autoload)) { - require_once(dirname(__FILE__).'/../autoload/sfCoreAutoload.class.php'); + require_once(__DIR__.'/../autoload/sfCoreAutoload.class.php'); sfCoreAutoload::register(); } else @@ -30,7 +30,7 @@ $dispatcher = new sfEventDispatcher(); $logger = new sfCommandLogger($dispatcher); - $application = new sfSymfonyCommandApplication($dispatcher, null, array('symfony_lib_dir' => realpath(dirname(__FILE__).'/..'))); + $application = new sfSymfonyCommandApplication($dispatcher, null, array('symfony_lib_dir' => realpath(__DIR__.'/..'))); $statusCode = $application->run(); } catch (Exception $e) diff --git a/lib/config/sfProjectConfiguration.class.php b/lib/config/sfProjectConfiguration.class.php index 20dad421c..86725e26a 100644 --- a/lib/config/sfProjectConfiguration.class.php +++ b/lib/config/sfProjectConfiguration.class.php @@ -45,7 +45,7 @@ public function __construct($rootDir = null, sfEventDispatcher $dispatcher = nul } $this->rootDir = null === $rootDir ? self::guessRootDir() : realpath($rootDir); - $this->symfonyLibDir = realpath(dirname(__FILE__).'/..'); + $this->symfonyLibDir = realpath(__DIR__.'/..'); $this->dispatcher = null === $dispatcher ? new sfEventDispatcher() : $dispatcher; ini_set('magic_quotes_runtime', 'off'); diff --git a/lib/controller/default/templates/disabledSuccess.php b/lib/controller/default/templates/disabledSuccess.php index e72e84c79..b9cb12c1b 100644 --- a/lib/controller/default/templates/disabledSuccess.php +++ b/lib/controller/default/templates/disabledSuccess.php @@ -1,4 +1,4 @@ - +
'module disabled', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> diff --git a/lib/controller/default/templates/error404Success.php b/lib/controller/default/templates/error404Success.php index 66aaee1d1..a836b757e 100644 --- a/lib/controller/default/templates/error404Success.php +++ b/lib/controller/default/templates/error404Success.php @@ -1,4 +1,4 @@ - +
'page not found', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> diff --git a/lib/controller/default/templates/indexSuccess.php b/lib/controller/default/templates/indexSuccess.php index edfed0b8d..c4fcb9e8f 100644 --- a/lib/controller/default/templates/indexSuccess.php +++ b/lib/controller/default/templates/indexSuccess.php @@ -1,4 +1,4 @@ - +
'ok', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> diff --git a/lib/controller/default/templates/loginSuccess.php b/lib/controller/default/templates/loginSuccess.php index 10e9280ba..0c064b08b 100644 --- a/lib/controller/default/templates/loginSuccess.php +++ b/lib/controller/default/templates/loginSuccess.php @@ -1,4 +1,4 @@ - +
'login required', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> diff --git a/lib/controller/default/templates/moduleSuccess.php b/lib/controller/default/templates/moduleSuccess.php index 7cb6d3561..cacd8cb74 100644 --- a/lib/controller/default/templates/moduleSuccess.php +++ b/lib/controller/default/templates/moduleSuccess.php @@ -1,4 +1,4 @@ - +
'module created', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> diff --git a/lib/controller/default/templates/secureSuccess.php b/lib/controller/default/templates/secureSuccess.php index e19126714..19d893378 100644 --- a/lib/controller/default/templates/secureSuccess.php +++ b/lib/controller/default/templates/secureSuccess.php @@ -1,4 +1,4 @@ - +
'credentials required', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> diff --git a/lib/exception/sfException.class.php b/lib/exception/sfException.class.php index 7764296c7..ef885f4fc 100644 --- a/lib/exception/sfException.class.php +++ b/lib/exception/sfException.class.php @@ -259,7 +259,7 @@ static public function getTemplatePathForError($format, $debug) $templatePaths = array( sfConfig::get('sf_app_config_dir').'/error', sfConfig::get('sf_config_dir').'/error', - dirname(__FILE__).'/data', + __DIR__.'/data', ); $template = sprintf('%s.%s.php', $debug ? 'exception' : 'error', $format); diff --git a/lib/helper/DateHelper.php b/lib/helper/DateHelper.php index c6761bce2..098a09229 100644 --- a/lib/helper/DateHelper.php +++ b/lib/helper/DateHelper.php @@ -153,7 +153,7 @@ function distance_of_time_in_words($from_time, $to_time = null, $include_seconds if (sfConfig::get('sf_i18n')) { - require_once dirname(__FILE__).'/I18NHelper.php'; + require_once __DIR__.'/I18NHelper.php'; return __($string, $parameters); } diff --git a/lib/i18n/Gettext/MO.php b/lib/i18n/Gettext/MO.php index 5f95aefab..f238904b3 100644 --- a/lib/i18n/Gettext/MO.php +++ b/lib/i18n/Gettext/MO.php @@ -21,7 +21,7 @@ * @license PHP License */ -require_once dirname(__FILE__).'/TGettext.class.php'; +require_once __DIR__.'/TGettext.class.php'; /** * File_Gettext_MO @@ -334,4 +334,4 @@ function save($file = null) @fclose($this->_handle); return true; } -} \ No newline at end of file +} diff --git a/lib/i18n/Gettext/PO.php b/lib/i18n/Gettext/PO.php index fefabbb0a..6a6a38bd9 100644 --- a/lib/i18n/Gettext/PO.php +++ b/lib/i18n/Gettext/PO.php @@ -21,7 +21,7 @@ * @license PHP License */ -require_once dirname(__FILE__).'/TGettext.class.php'; +require_once __DIR__.'/TGettext.class.php'; /** * File_Gettext_PO @@ -140,4 +140,4 @@ function save($file = null) @fclose($fh); return true; } -} \ No newline at end of file +} diff --git a/lib/i18n/Gettext/TGettext.class.php b/lib/i18n/Gettext/TGettext.class.php index 0ab760b7e..fe6dc222f 100644 --- a/lib/i18n/Gettext/TGettext.class.php +++ b/lib/i18n/Gettext/TGettext.class.php @@ -84,7 +84,7 @@ class TGettext static function factory($format, $file = '') { $format = strToUpper($format); - $filename = dirname(__FILE__).'/'.$format.'.php'; + $filename = __DIR__.'/'.$format.'.php'; if (is_file($filename) == false) throw new Exception ("Class file $file not found"); @@ -112,7 +112,7 @@ function poFile2moFile($pofile, $mofile) throw new Exception("File $pofile doesn't exist."); } - include_once dirname(__FILE__).'/PO.php'; + include_once __DIR__.'/PO.php'; $PO = new TGettext_PO($pofile); if (true !== ($e = $PO->load())) { @@ -248,7 +248,7 @@ function fromArray($array) */ function toMO() { - include_once dirname(__FILE__).'/MO.php'; + include_once __DIR__.'/MO.php'; $MO = new TGettext_MO; $MO->fromArray($this->toArray()); return $MO; @@ -262,9 +262,9 @@ function toMO() */ function toPO() { - include_once dirname(__FILE__).'/PO.php'; + include_once __DIR__.'/PO.php'; $PO = new TGettext_PO; $PO->fromArray($this->toArray()); return $PO; } -} \ No newline at end of file +} diff --git a/lib/i18n/sfCultureInfo.class.php b/lib/i18n/sfCultureInfo.class.php index 3afc0ccf2..a14fd7c0f 100644 --- a/lib/i18n/sfCultureInfo.class.php +++ b/lib/i18n/sfCultureInfo.class.php @@ -225,7 +225,7 @@ public function __construct($culture = 'en') */ protected static function dataDir() { - return dirname(__FILE__).'/data/'; + return __DIR__.'/data/'; } /** diff --git a/lib/task/generator/sfGenerateAppTask.class.php b/lib/task/generator/sfGenerateAppTask.class.php index bd1824146..e58bebc58 100644 --- a/lib/task/generator/sfGenerateAppTask.class.php +++ b/lib/task/generator/sfGenerateAppTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfGeneratorBaseTask.class.php'); +require_once(__DIR__.'/sfGeneratorBaseTask.class.php'); /** * Generates a new application. @@ -101,7 +101,7 @@ protected function execute($arguments = array(), $options = array()) } else { - $skeletonDir = dirname(__FILE__).'/skeleton/app'; + $skeletonDir = __DIR__.'/skeleton/app'; } // Create basic application structure diff --git a/lib/task/generator/sfGenerateModuleTask.class.php b/lib/task/generator/sfGenerateModuleTask.class.php index af2756c31..ba0137367 100644 --- a/lib/task/generator/sfGenerateModuleTask.class.php +++ b/lib/task/generator/sfGenerateModuleTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfGeneratorBaseTask.class.php'); +require_once(__DIR__.'/sfGeneratorBaseTask.class.php'); /** * Generates a new module. @@ -96,7 +96,7 @@ protected function execute($arguments = array(), $options = array()) } else { - $skeletonDir = dirname(__FILE__).'/skeleton/module'; + $skeletonDir = __DIR__.'/skeleton/module'; } // create basic application structure diff --git a/lib/task/generator/sfGenerateProjectTask.class.php b/lib/task/generator/sfGenerateProjectTask.class.php index 0e89abf2d..1c6d0e77b 100755 --- a/lib/task/generator/sfGenerateProjectTask.class.php +++ b/lib/task/generator/sfGenerateProjectTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfGeneratorBaseTask.class.php'); +require_once(__DIR__.'/sfGeneratorBaseTask.class.php'); /** * Generates a new project. @@ -104,11 +104,11 @@ protected function execute($arguments = array(), $options = array()) $this->options = $options; // create basic project structure - $this->installDir(dirname(__FILE__).'/skeleton/project'); + $this->installDir(__DIR__.'/skeleton/project'); // update ProjectConfiguration class (use a relative path when the symfony core is nested within the project) $symfonyCoreAutoload = 0 === strpos(sfConfig::get('sf_symfony_lib_dir'), sfConfig::get('sf_root_dir')) ? - sprintf('dirname(__FILE__).\'/..%s/autoload/sfCoreAutoload.class.php\'', str_replace(sfConfig::get('sf_root_dir'), '', sfConfig::get('sf_symfony_lib_dir'))) : + sprintf('__DIR__.\'/..%s/autoload/sfCoreAutoload.class.php\'', str_replace(sfConfig::get('sf_root_dir'), '', sfConfig::get('sf_symfony_lib_dir'))) : var_export(sfConfig::get('sf_symfony_lib_dir').'/autoload/sfCoreAutoload.class.php', true); $this->replaceTokens(array(sfConfig::get('sf_config_dir')), array('SYMFONY_CORE_AUTOLOAD' => str_replace('\\', '/', $symfonyCoreAutoload))); @@ -125,7 +125,7 @@ protected function execute($arguments = array(), $options = array()) // execute the choosen ORM installer script if (in_array($options['orm'], array('Doctrine'))) { - include dirname(__FILE__).'/../../plugins/sf'.$options['orm'].'Plugin/config/installer.php'; + include __DIR__.'/../../plugins/sf'.$options['orm'].'Plugin/config/installer.php'; } // execute a custom installer diff --git a/lib/task/generator/skeleton/app/web/index.php b/lib/task/generator/skeleton/app/web/index.php index 5b19abdaf..abf55a39c 100644 --- a/lib/task/generator/skeleton/app/web/index.php +++ b/lib/task/generator/skeleton/app/web/index.php @@ -1,7 +1,7 @@ dispatch(); diff --git a/lib/task/generator/skeleton/module/test/actionsTest.php b/lib/task/generator/skeleton/module/test/actionsTest.php index f487ff8e5..7f70b9558 100644 --- a/lib/task/generator/skeleton/module/test/actionsTest.php +++ b/lib/task/generator/skeleton/module/test/actionsTest.php @@ -1,6 +1,6 @@ getBaseDir().'/command/cli.php'); diff --git a/lib/task/generator/skeleton/project/test/bootstrap/functional.php b/lib/task/generator/skeleton/project/test/bootstrap/functional.php index 7e174f88f..72185ae87 100644 --- a/lib/task/generator/skeleton/project/test/bootstrap/functional.php +++ b/lib/task/generator/skeleton/project/test/bootstrap/functional.php @@ -18,7 +18,7 @@ $app = array_pop($dirPieces); } -require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php'; +require_once __DIR__.'/../../config/ProjectConfiguration.class.php'; $configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true); sfContext::createInstance($configuration); diff --git a/lib/task/generator/skeleton/project/test/bootstrap/unit.php b/lib/task/generator/skeleton/project/test/bootstrap/unit.php index 05601159c..74d6e0cfc 100644 --- a/lib/task/generator/skeleton/project/test/bootstrap/unit.php +++ b/lib/task/generator/skeleton/project/test/bootstrap/unit.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -$_test_dir = realpath(dirname(__FILE__).'/..'); +$_test_dir = realpath(__DIR__.'/..'); // configuration -require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php'; +require_once __DIR__.'/../../config/ProjectConfiguration.class.php'; $configuration = ProjectConfiguration::hasActive() ? ProjectConfiguration::getActive() : new ProjectConfiguration(realpath($_test_dir.'/..')); // autoloader diff --git a/lib/task/plugin/sfPluginAddChannelTask.class.php b/lib/task/plugin/sfPluginAddChannelTask.class.php index 07a28fb63..cf330fe87 100644 --- a/lib/task/plugin/sfPluginAddChannelTask.class.php +++ b/lib/task/plugin/sfPluginAddChannelTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); +require_once(__DIR__.'/sfPluginBaseTask.class.php'); /** * Installs a plugin. diff --git a/lib/task/plugin/sfPluginInstallTask.class.php b/lib/task/plugin/sfPluginInstallTask.class.php index cb1b35551..a6b1fe1f6 100644 --- a/lib/task/plugin/sfPluginInstallTask.class.php +++ b/lib/task/plugin/sfPluginInstallTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); +require_once(__DIR__.'/sfPluginBaseTask.class.php'); /** * Installs a plugin. diff --git a/lib/task/plugin/sfPluginListTask.class.php b/lib/task/plugin/sfPluginListTask.class.php index 7fc40432f..c131b13d2 100644 --- a/lib/task/plugin/sfPluginListTask.class.php +++ b/lib/task/plugin/sfPluginListTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); +require_once(__DIR__.'/sfPluginBaseTask.class.php'); /** * Lists installed plugins. diff --git a/lib/task/plugin/sfPluginPublishAssetsTask.class.php b/lib/task/plugin/sfPluginPublishAssetsTask.class.php index f13bc07b6..a2cfb8fdd 100644 --- a/lib/task/plugin/sfPluginPublishAssetsTask.class.php +++ b/lib/task/plugin/sfPluginPublishAssetsTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); +require_once(__DIR__.'/sfPluginBaseTask.class.php'); /** * Publishes Web Assets for Core and third party plugins diff --git a/lib/task/plugin/sfPluginUninstallTask.class.php b/lib/task/plugin/sfPluginUninstallTask.class.php index a87869821..6e5d1febb 100644 --- a/lib/task/plugin/sfPluginUninstallTask.class.php +++ b/lib/task/plugin/sfPluginUninstallTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); +require_once(__DIR__.'/sfPluginBaseTask.class.php'); /** * Uninstall a plugin. diff --git a/lib/task/plugin/sfPluginUpgradeTask.class.php b/lib/task/plugin/sfPluginUpgradeTask.class.php index 1c306303e..a68269274 100644 --- a/lib/task/plugin/sfPluginUpgradeTask.class.php +++ b/lib/task/plugin/sfPluginUpgradeTask.class.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); +require_once(__DIR__.'/sfPluginBaseTask.class.php'); /** * Upgrades a plugin. diff --git a/lib/task/project/sfProjectValidateTask.class.php b/lib/task/project/sfProjectValidateTask.class.php index 30f7c7b07..1fd690e7c 100644 --- a/lib/task/project/sfProjectValidateTask.class.php +++ b/lib/task/project/sfProjectValidateTask.class.php @@ -82,7 +82,7 @@ protected function formatFile($file) protected function getUpgradeClasses() { - $baseDir = dirname(__FILE__).'/validation/'; + $baseDir = __DIR__.'/validation/'; $classes = array(); foreach (glob($baseDir.'*.class.php') as $file) diff --git a/lib/task/symfony/sfSymfonyTestTask.class.php b/lib/task/symfony/sfSymfonyTestTask.class.php index ddec96b7b..db04e26ec 100644 --- a/lib/task/symfony/sfSymfonyTestTask.class.php +++ b/lib/task/symfony/sfSymfonyTestTask.class.php @@ -46,11 +46,11 @@ protected function configure() */ protected function execute($arguments = array(), $options = array()) { - require_once(dirname(__FILE__).'/../../vendor/lime/lime.php'); - require_once(dirname(__FILE__).'/lime_symfony.php'); + require_once(__DIR__.'/../../vendor/lime/lime.php'); + require_once(__DIR__.'/lime_symfony.php'); // cleanup - require_once(dirname(__FILE__).'/../../util/sfToolkit.class.php'); + require_once(__DIR__.'/../../util/sfToolkit.class.php'); if ($files = glob(sys_get_temp_dir().DIRECTORY_SEPARATOR.'/sf_autoload_unit_*')) { foreach ($files as $file) @@ -62,12 +62,12 @@ protected function execute($arguments = array(), $options = array()) // update sfCoreAutoload if ($options['update-autoloader']) { - require_once(dirname(__FILE__).'/../../autoload/sfCoreAutoload.class.php'); + require_once(__DIR__.'/../../autoload/sfCoreAutoload.class.php'); sfCoreAutoload::make(); } $status = false; - $statusFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.sprintf('/.test_symfony_%s_status', md5(dirname(__FILE__))); + $statusFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.sprintf('/.test_symfony_%s_status', md5(__DIR__)); if ($options['only-failed']) { if (file_exists($statusFile)) @@ -77,7 +77,7 @@ protected function execute($arguments = array(), $options = array()) } $h = new lime_symfony(array('force_colors' => $options['color'], 'verbose' => $options['trace'])); - $h->base_dir = realpath(dirname(__FILE__).'/../../../test'); + $h->base_dir = realpath(__DIR__.'/../../../test'); // remove generated files if ($options['rebuild-all']) diff --git a/lib/task/test/sfLimeHarness.class.php b/lib/task/test/sfLimeHarness.class.php index 2f94c7059..d6e76b2a7 100644 --- a/lib/task/test/sfLimeHarness.class.php +++ b/lib/task/test/sfLimeHarness.class.php @@ -1,6 +1,6 @@ isset($options['color']) && $options['color'], diff --git a/lib/task/test/sfTestCoverageTask.class.php b/lib/task/test/sfTestCoverageTask.class.php index 542903363..28d2a313b 100644 --- a/lib/task/test/sfTestCoverageTask.class.php +++ b/lib/task/test/sfTestCoverageTask.class.php @@ -73,7 +73,7 @@ protected function execute($arguments = array(), $options = array()) protected function getTestHarness($harnessOptions = array()) { - require_once dirname(__FILE__).'/sfLimeHarness.class.php'; + require_once __DIR__.'/sfLimeHarness.class.php'; $harness = new sfLimeHarness($harnessOptions); $harness->addPlugins(array_map(array($this->configuration, 'getPluginConfiguration'), $this->configuration->getPlugins())); diff --git a/lib/task/test/sfTestFunctionalTask.class.php b/lib/task/test/sfTestFunctionalTask.class.php index a706c03ea..1f0b12b03 100644 --- a/lib/task/test/sfTestFunctionalTask.class.php +++ b/lib/task/test/sfTestFunctionalTask.class.php @@ -96,7 +96,7 @@ protected function execute($arguments = array(), $options = array()) } else { - require_once dirname(__FILE__).'/sfLimeHarness.class.php'; + require_once __DIR__.'/sfLimeHarness.class.php'; $h = new sfLimeHarness(array( 'force_colors' => isset($options['color']) && $options['color'], @@ -119,4 +119,4 @@ protected function execute($arguments = array(), $options = array()) return $ret; } } -} \ No newline at end of file +} diff --git a/lib/task/test/sfTestUnitTask.class.php b/lib/task/test/sfTestUnitTask.class.php index cfc4c66bf..811d71a01 100644 --- a/lib/task/test/sfTestUnitTask.class.php +++ b/lib/task/test/sfTestUnitTask.class.php @@ -91,7 +91,7 @@ protected function execute($arguments = array(), $options = array()) } else { - require_once dirname(__FILE__).'/sfLimeHarness.class.php'; + require_once __DIR__.'/sfLimeHarness.class.php'; $h = new sfLimeHarness(array( 'force_colors' => isset($options['color']) && $options['color'], diff --git a/lib/test/sfTestBrowser.class.php b/lib/test/sfTestBrowser.class.php index 18cc1b218..a63fb430f 100644 --- a/lib/test/sfTestBrowser.class.php +++ b/lib/test/sfTestBrowser.class.php @@ -1,6 +1,6 @@ discard('.sf'); - $filesystem->mirror(dirname(__FILE__).'/w3', $cache, $finder); + $filesystem->mirror(__DIR__.'/w3', $cache, $finder); $finder = sfFinder::type('file'); $filesystem->replaceTokens($finder->in($cache), '##', '##', array('LOCAL_W3' => $local)); diff --git a/test/bin/coverage.php b/test/bin/coverage.php index 658585972..e4f7cc40b 100644 --- a/test/bin/coverage.php +++ b/test/bin/coverage.php @@ -17,11 +17,11 @@ $verbose = true; } -require_once(dirname(__FILE__).'/../../lib/vendor/lime/lime.php'); -require_once(dirname(__FILE__).'/../../lib/util/sfFinder.class.php'); +require_once(__DIR__.'/../../lib/vendor/lime/lime.php'); +require_once(__DIR__.'/../../lib/util/sfFinder.class.php'); $h = new lime_harness(); -$h->base_dir = realpath(dirname(__FILE__).'/..'); +$h->base_dir = realpath(__DIR__.'/..'); // unit tests $h->register_glob(sprintf('%s/unit/*/%sTest.php', $h->base_dir, $name)); @@ -37,7 +37,7 @@ $c = new lime_coverage($h); $c->extension = '.class.php'; $c->verbose = $verbose; -$c->base_dir = realpath(dirname(__FILE__).'/../../lib'); +$c->base_dir = realpath(__DIR__.'/../../lib'); $finder = sfFinder::type('file')->name($name.'.class.php')->prune('vendor')->prune('test')->prune('data'); diff --git a/test/bin/loc.php b/test/bin/loc.php index fcc65ad0b..a5462174f 100755 --- a/test/bin/loc.php +++ b/test/bin/loc.php @@ -1,6 +1,6 @@ get('/cache/imageWithLayoutCacheWithLayout')-> diff --git a/test/functional/escapingTest.php b/test/functional/escapingTest.php index 3e47fce0d..4803f137c 100644 --- a/test/functional/escapingTest.php +++ b/test/functional/escapingTest.php @@ -9,7 +9,7 @@ */ $app = 'frontend'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/filterTest.php b/test/functional/filterTest.php index c1d0724d4..b34f9372a 100644 --- a/test/functional/filterTest.php +++ b/test/functional/filterTest.php @@ -9,7 +9,7 @@ */ $app = 'frontend'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/fixtures/apps/cache/modules/cache/actions/actions.class.php b/test/functional/fixtures/apps/cache/modules/cache/actions/actions.class.php index 7d920da06..0aa42dbe7 100644 --- a/test/functional/fixtures/apps/cache/modules/cache/actions/actions.class.php +++ b/test/functional/fixtures/apps/cache/modules/cache/actions/actions.class.php @@ -92,7 +92,7 @@ public function executeImageNoLayoutCacheNoLayout() protected function prepareImage() { $this->getResponse()->setContentType('image/png'); - $this->image = file_get_contents(dirname(__FILE__).'/../data/ok48.png'); + $this->image = file_get_contents(__DIR__.'/../data/ok48.png'); $this->setTemplate('image'); } diff --git a/test/functional/fixtures/apps/frontend/lib/myAutoload.class.php b/test/functional/fixtures/apps/frontend/lib/myAutoload.class.php index f95b71a4d..e26c9944d 100644 --- a/test/functional/fixtures/apps/frontend/lib/myAutoload.class.php +++ b/test/functional/fixtures/apps/frontend/lib/myAutoload.class.php @@ -6,7 +6,7 @@ static public function autoload($class) { if ('myAutoloadedClass' == $class) { - require_once(dirname(__FILE__).'/myAutoloadedClass.class.php'); + require_once(__DIR__.'/myAutoloadedClass.class.php'); return true; } diff --git a/test/functional/fixtures/config/ProjectConfiguration.class.php b/test/functional/fixtures/config/ProjectConfiguration.class.php index b61849e52..e9ef1b327 100644 --- a/test/functional/fixtures/config/ProjectConfiguration.class.php +++ b/test/functional/fixtures/config/ProjectConfiguration.class.php @@ -1,6 +1,6 @@ + path: exclude: [vendor] recursive: true not_in_lib_class: name: NotInLib class files: - NotInLib: + NotInLib: diff --git a/test/functional/fixtures/symfony b/test/functional/fixtures/symfony index 3ea1419a8..720a9e1ad 100755 --- a/test/functional/fixtures/symfony +++ b/test/functional/fixtures/symfony @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -chdir(dirname(__FILE__)); -require_once(dirname(__FILE__).'/config/ProjectConfiguration.class.php'); +chdir(__DIR__); +require_once(__DIR__.'/config/ProjectConfiguration.class.php'); $configuration = new ProjectConfiguration(); include($configuration->getSymfonyLibDir().'/command/cli.php'); diff --git a/test/functional/formatTest.php b/test/functional/formatTest.php index 1cfcdc5ba..b401171d6 100644 --- a/test/functional/formatTest.php +++ b/test/functional/formatTest.php @@ -9,7 +9,7 @@ */ $app = 'frontend'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/genericTest.php b/test/functional/genericTest.php index f70672271..3e6544f89 100644 --- a/test/functional/genericTest.php +++ b/test/functional/genericTest.php @@ -9,7 +9,7 @@ */ $app = 'frontend'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/httpcacheTest.php b/test/functional/httpcacheTest.php index d21731d10..c38cb9bfa 100644 --- a/test/functional/httpcacheTest.php +++ b/test/functional/httpcacheTest.php @@ -9,7 +9,7 @@ */ $app = 'cache'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/i18nFormTest.php b/test/functional/i18nFormTest.php index 13c5a15c4..645e91508 100644 --- a/test/functional/i18nFormTest.php +++ b/test/functional/i18nFormTest.php @@ -9,7 +9,7 @@ */ $app = 'i18n'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/i18nTest.php b/test/functional/i18nTest.php index fc8ac9e68..6cf49b819 100644 --- a/test/functional/i18nTest.php +++ b/test/functional/i18nTest.php @@ -9,7 +9,7 @@ */ $app = 'i18n'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/prodTest.php b/test/functional/prodTest.php index 799c8b828..127e88a74 100644 --- a/test/functional/prodTest.php +++ b/test/functional/prodTest.php @@ -10,7 +10,7 @@ $app = 'frontend'; $debug = false; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/functional/sfTestBrowserTest.php b/test/functional/sfTestBrowserTest.php index 67a5cce20..f93f5727a 100644 --- a/test/functional/sfTestBrowserTest.php +++ b/test/functional/sfTestBrowserTest.php @@ -9,7 +9,7 @@ */ $app = 'frontend'; -if (!include(dirname(__FILE__).'/../bootstrap/functional.php')) +if (!include(__DIR__.'/../bootstrap/functional.php')) { return; } diff --git a/test/other/fixtures/test/unit/testTest.php b/test/other/fixtures/test/unit/testTest.php index e93bae0a7..c1c6a48e1 100644 --- a/test/other/fixtures/test/unit/testTest.php +++ b/test/other/fixtures/test/unit/testTest.php @@ -1,6 +1,6 @@ tmp_dir); } public function execute_command($cmd, $awaited_return=0) { chdir($this->tmp_dir); - $symfony = file_exists('symfony') ? 'symfony' : dirname(__FILE__).'/../../data/bin/symfony'; + $symfony = file_exists('symfony') ? 'symfony' : __DIR__.'/../../data/bin/symfony'; ob_start(); passthru(sprintf('%s "%s" %s 2>&1', $this->php_cli, $symfony, $cmd), $return); @@ -61,7 +61,7 @@ public function execute_command($cmd, $awaited_return=0) public function get_fixture_content($file) { - return str_replace("\r\n", "\n", file_get_contents(dirname(__FILE__).'/fixtures/'.$file)); + return str_replace("\r\n", "\n", file_get_contents(__DIR__.'/fixtures/'.$file)); } } @@ -97,10 +97,10 @@ public function get_fixture_content($file) $content = $c->execute_command('generate:module frontend foo'); $t->ok(is_dir($c->tmp_dir.DS.'apps'.DS.'frontend'.DS.'modules'.DS.'foo'), '"generate:module" creates a "foo" directory under "modules" directory'); -copy(dirname(__FILE__).'/fixtures/factories.yml', $c->tmp_dir.DS.'apps'.DS.'frontend'.DS.'config'.DS.'factories.yml'); +copy(__DIR__.'/fixtures/factories.yml', $c->tmp_dir.DS.'apps'.DS.'frontend'.DS.'config'.DS.'factories.yml'); // test:* -copy(dirname(__FILE__).'/fixtures/test/unit/testTest.php', $c->tmp_dir.DS.'test'.DS.'unit'.DS.'testTest.php'); +copy(__DIR__.'/fixtures/test/unit/testTest.php', $c->tmp_dir.DS.'test'.DS.'unit'.DS.'testTest.php'); $content = $c->execute_command('test:unit test'); $t->is($content, $c->get_fixture_content('/test/unit/result.txt'), '"test:unit" can launch a particular unit test'); @@ -113,7 +113,7 @@ public function get_fixture_content($file) // Test task autoloading mkdir($c->tmp_dir.DS.'lib'.DS.'task'); mkdir($pluginDir = $c->tmp_dir.DS.'plugins'.DS.'myFooPlugin'.DS.'lib'.DS.'task', 0777, true); -copy(dirname(__FILE__).'/fixtures/task/myPluginTask.class.php', $pluginDir.DS.'myPluginTask.class.php'); +copy(__DIR__.'/fixtures/task/myPluginTask.class.php', $pluginDir.DS.'myPluginTask.class.php'); file_put_contents( $projectConfigurationFile = $c->tmp_dir.DS.'config'.DS.'ProjectConfiguration.class.php', str_replace( diff --git a/test/unit/action/sfComponentTest.php b/test/unit/action/sfComponentTest.php index 96340d8f5..edbf9b0d7 100644 --- a/test/unit/action/sfComponentTest.php +++ b/test/unit/action/sfComponentTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); require_once($_test_dir.'/unit/sfNoRouting.class.php'); diff --git a/test/unit/addon/sfPagerTest.php b/test/unit/addon/sfPagerTest.php index c1a8cfa3f..b588238fc 100644 --- a/test/unit/addon/sfPagerTest.php +++ b/test/unit/addon/sfPagerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); class myPager extends sfPager @@ -40,4 +40,4 @@ function getResults() { $countRuns++; } -$t->is($countRuns, $pager->count(), '->rewind will allow reiterating'); \ No newline at end of file +$t->is($countRuns, $pager->count(), '->rewind will allow reiterating'); diff --git a/test/unit/autoload/sfCoreAutoloadTest.php b/test/unit/autoload/sfCoreAutoloadTest.php index 3bba79609..299b7f099 100644 --- a/test/unit/autoload/sfCoreAutoloadTest.php +++ b/test/unit/autoload/sfCoreAutoloadTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; $t = new lime_test(1); diff --git a/test/unit/autoload/sfSimpleAutoloadTest.php b/test/unit/autoload/sfSimpleAutoloadTest.php index 3560b2996..0ce066686 100644 --- a/test/unit/autoload/sfSimpleAutoloadTest.php +++ b/test/unit/autoload/sfSimpleAutoloadTest.php @@ -8,12 +8,12 @@ * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; $t = new lime_test(1); $autoload = sfSimpleAutoload::getInstance(); -$autoload->addFile(dirname(__FILE__).'/../sfEventDispatcherTest.class.php'); +$autoload->addFile(__DIR__.'/../sfEventDispatcherTest.class.php'); $autoload->register(); $t->is(class_exists('myeventdispatchertest'), true, '"sfSimpleAutoload" is case insensitive'); diff --git a/test/unit/cache/sfAPCCacheTest.php b/test/unit/cache/sfAPCCacheTest.php index d9c7e9a4c..343a68fac 100644 --- a/test/unit/cache/sfAPCCacheTest.php +++ b/test/unit/cache/sfAPCCacheTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $plan = 64; $t = new lime_test($plan); @@ -29,7 +29,7 @@ return; } -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); // setup sfConfig::set('sf_logging_enabled', false); diff --git a/test/unit/cache/sfCacheTest.php b/test/unit/cache/sfCacheTest.php index 27bd88898..8be6dd5e1 100644 --- a/test/unit/cache/sfCacheTest.php +++ b/test/unit/cache/sfCacheTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class myCache extends sfCache { diff --git a/test/unit/cache/sfEAcceleratorCacheTest.php b/test/unit/cache/sfEAcceleratorCacheTest.php index 87a8afd91..7b4f57de5 100644 --- a/test/unit/cache/sfEAcceleratorCacheTest.php +++ b/test/unit/cache/sfEAcceleratorCacheTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $plan = 64; $t = new lime_test($plan); @@ -23,7 +23,7 @@ return; } -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); // setup sfConfig::set('sf_logging_enabled', false); diff --git a/test/unit/cache/sfFileCacheTest.php b/test/unit/cache/sfFileCacheTest.php index 799e1ae9e..20b5166d1 100644 --- a/test/unit/cache/sfFileCacheTest.php +++ b/test/unit/cache/sfFileCacheTest.php @@ -8,8 +8,8 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); $t = new lime_test(65); diff --git a/test/unit/cache/sfFunctionCacheTest.php b/test/unit/cache/sfFunctionCacheTest.php index 5010f5770..1434bc317 100644 --- a/test/unit/cache/sfFunctionCacheTest.php +++ b/test/unit/cache/sfFunctionCacheTest.php @@ -8,8 +8,8 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); $t = new lime_test(15); diff --git a/test/unit/cache/sfMemcacheCacheTest.php b/test/unit/cache/sfMemcacheCacheTest.php index 7ac170740..7de822f0d 100644 --- a/test/unit/cache/sfMemcacheCacheTest.php +++ b/test/unit/cache/sfMemcacheCacheTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $plan = 73; $t = new lime_test($plan); @@ -19,7 +19,7 @@ return; } -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); // setup sfConfig::set('sf_logging_enabled', false); @@ -66,4 +66,4 @@ $t->is(count($cacheInfo),1,'Cache info contains 1 element'); $t->ok(!in_array($prefix.'test_1',$cacheInfo),'Cache info no longer contains the key that matches the pattern (first key)'); $t->ok(!in_array($prefix.'test_2',$cacheInfo),'Cache info no longer contains the key that matches the pattern (second key)'); -$t->ok(in_array($prefix.'test3',$cacheInfo),'Cache info still contains the key that did not match the pattern (third key)'); \ No newline at end of file +$t->ok(in_array($prefix.'test3',$cacheInfo),'Cache info still contains the key that did not match the pattern (third key)'); diff --git a/test/unit/cache/sfNoCacheTest.php b/test/unit/cache/sfNoCacheTest.php index 5d9b9abab..144a638a8 100644 --- a/test/unit/cache/sfNoCacheTest.php +++ b/test/unit/cache/sfNoCacheTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(8); diff --git a/test/unit/cache/sfSQLiteCacheTest.php b/test/unit/cache/sfSQLiteCacheTest.php index 4780ea9bd..e0d82302d 100644 --- a/test/unit/cache/sfSQLiteCacheTest.php +++ b/test/unit/cache/sfSQLiteCacheTest.php @@ -8,8 +8,8 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); $plan = 129; $t = new lime_test($plan); diff --git a/test/unit/cache/sfXCacheCacheTest.php b/test/unit/cache/sfXCacheCacheTest.php index 30a0842fa..fbe5cd94c 100644 --- a/test/unit/cache/sfXCacheCacheTest.php +++ b/test/unit/cache/sfXCacheCacheTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $plan = 64; $t = new lime_test($plan); @@ -23,7 +23,7 @@ return; } -require_once(dirname(__FILE__).'/sfCacheDriverTests.class.php'); +require_once(__DIR__.'/sfCacheDriverTests.class.php'); // setup sfConfig::set('sf_logging_enabled', false); diff --git a/test/unit/command/sfCommandArgumentSetTest.php b/test/unit/command/sfCommandArgumentSetTest.php index 68faad963..fc36b2f88 100644 --- a/test/unit/command/sfCommandArgumentSetTest.php +++ b/test/unit/command/sfCommandArgumentSetTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(21); diff --git a/test/unit/command/sfCommandArgumentTest.php b/test/unit/command/sfCommandArgumentTest.php index ebd7d4fc7..18495e8f6 100644 --- a/test/unit/command/sfCommandArgumentTest.php +++ b/test/unit/command/sfCommandArgumentTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(16); diff --git a/test/unit/command/sfCommandManagerTest.php b/test/unit/command/sfCommandManagerTest.php index a4fd42681..67d1676c3 100644 --- a/test/unit/command/sfCommandManagerTest.php +++ b/test/unit/command/sfCommandManagerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(41); diff --git a/test/unit/command/sfCommandOptionSetTest.php b/test/unit/command/sfCommandOptionSetTest.php index f7de2b2fa..5e26d5e37 100644 --- a/test/unit/command/sfCommandOptionSetTest.php +++ b/test/unit/command/sfCommandOptionSetTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(20); diff --git a/test/unit/command/sfCommandOptionTest.php b/test/unit/command/sfCommandOptionTest.php index d1fa9edf7..4f0504f06 100644 --- a/test/unit/command/sfCommandOptionTest.php +++ b/test/unit/command/sfCommandOptionTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(34); diff --git a/test/unit/config/sfCompileConfigHandlerTest.php b/test/unit/config/sfCompileConfigHandlerTest.php index 91f4f0786..9c67bf939 100644 --- a/test/unit/config/sfCompileConfigHandlerTest.php +++ b/test/unit/config/sfCompileConfigHandlerTest.php @@ -8,14 +8,14 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); $handler = new sfCompileConfigHandler(); $handler->initialize(); -$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfCompileConfigHandler'.DIRECTORY_SEPARATOR; +$dir = __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfCompileConfigHandler'.DIRECTORY_SEPARATOR; $t->diag('execute'); diff --git a/test/unit/config/sfConfigHandlerTest.php b/test/unit/config/sfConfigHandlerTest.php index 38ef7822e..c90d804cd 100644 --- a/test/unit/config/sfConfigHandlerTest.php +++ b/test/unit/config/sfConfigHandlerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(8); diff --git a/test/unit/config/sfConfigTest.php b/test/unit/config/sfConfigTest.php index 3cabc5018..ebcc6d332 100644 --- a/test/unit/config/sfConfigTest.php +++ b/test/unit/config/sfConfigTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(9); diff --git a/test/unit/config/sfDefineEnvironmentConfigHandlerTest.php b/test/unit/config/sfDefineEnvironmentConfigHandlerTest.php index f99790041..8436bfbea 100644 --- a/test/unit/config/sfDefineEnvironmentConfigHandlerTest.php +++ b/test/unit/config/sfDefineEnvironmentConfigHandlerTest.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); -sfConfig::set('sf_symfony_lib_dir', realpath(dirname(__FILE__).'/../../../lib')); +sfConfig::set('sf_symfony_lib_dir', realpath(__DIR__.'/../../../lib')); $t = new lime_test(1); @@ -18,7 +18,7 @@ $handler = new sfDefineEnvironmentConfigHandler(); $handler->initialize(array('prefix' => 'sf_')); -$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfDefineEnvironmentConfigHandler'.DIRECTORY_SEPARATOR; +$dir = __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfDefineEnvironmentConfigHandler'.DIRECTORY_SEPARATOR; $files = array( $dir.'prefix_default.yml', diff --git a/test/unit/config/sfFilterConfigHandlerTest.php b/test/unit/config/sfFilterConfigHandlerTest.php index 537f1fd43..00e69d5a4 100644 --- a/test/unit/config/sfFilterConfigHandlerTest.php +++ b/test/unit/config/sfFilterConfigHandlerTest.php @@ -8,14 +8,14 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(8); $handler = new sfFilterConfigHandler(); $handler->initialize(); -$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfFilterConfigHandler'.DIRECTORY_SEPARATOR; +$dir = __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfFilterConfigHandler'.DIRECTORY_SEPARATOR; // parse errors $t->diag('parse errors'); diff --git a/test/unit/config/sfGeneratorConfigHandlerTest.php b/test/unit/config/sfGeneratorConfigHandlerTest.php index eead09fe3..feaa01bbe 100644 --- a/test/unit/config/sfGeneratorConfigHandlerTest.php +++ b/test/unit/config/sfGeneratorConfigHandlerTest.php @@ -8,16 +8,16 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); -sfConfig::set('sf_symfony_lib_dir', realpath(dirname(__FILE__).'/../../../lib')); +sfConfig::set('sf_symfony_lib_dir', realpath(__DIR__.'/../../../lib')); $t = new lime_test(5); $handler = new sfGeneratorConfigHandler(); $handler->initialize(); -$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfGeneratorConfigHandler'.DIRECTORY_SEPARATOR; +$dir = __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfGeneratorConfigHandler'.DIRECTORY_SEPARATOR; $t->diag('parse errors'); $files = array( diff --git a/test/unit/config/sfPluginConfigurationTest.php b/test/unit/config/sfPluginConfigurationTest.php index 4d07f7b1b..2f592d9ea 100644 --- a/test/unit/config/sfPluginConfigurationTest.php +++ b/test/unit/config/sfPluginConfigurationTest.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; -$rootDir = realpath(dirname(__FILE__).'/../../functional/fixtures'); +$rootDir = realpath(__DIR__.'/../../functional/fixtures'); $pluginRoot = realpath($rootDir.'/plugins/sfAutoloadPlugin'); require_once $pluginRoot.'/config/sfAutoloadPluginConfiguration.class.php'; diff --git a/test/unit/config/sfProjectConfigurationTest.php b/test/unit/config/sfProjectConfigurationTest.php index e4f6d19bb..b28259b47 100644 --- a/test/unit/config/sfProjectConfigurationTest.php +++ b/test/unit/config/sfProjectConfigurationTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(6); @@ -21,7 +21,7 @@ public function setup() } } -$configuration = new ProjectConfiguration(dirname(__FILE__).'/../../functional/fixtures'); +$configuration = new ProjectConfiguration(__DIR__.'/../../functional/fixtures'); // ->setPlugins() ->disablePlugins() ->enablePlugins() ->enableAllPluginsExcept() $t->diag('->setPlugins() ->disablePlugins() ->enablePlugins() ->enableAllPluginsExcept()'); @@ -47,7 +47,7 @@ public function setup() } } -$configuration = new ProjectConfiguration2(dirname(__FILE__).'/../../functional/fixtures'); +$configuration = new ProjectConfiguration2(__DIR__.'/../../functional/fixtures'); $t->is_deeply($configuration->getPlugins(), array('sfAutoloadPlugin', 'sfConfigPlugin'), '->enablePlugins() can enable plugins passed as arguments instead of array'); // ->__construct() @@ -63,7 +63,7 @@ public function setup() try { - $configuration = new ProjectConfiguration3(dirname(__FILE__).'/../../functional/fixtures'); + $configuration = new ProjectConfiguration3(__DIR__.'/../../functional/fixtures'); $t->fail('->__construct() throws an exception if a non-existant plugin is enabled'); } catch (Exception $e) diff --git a/test/unit/config/sfSimpleYamlConfigHandlerTest.php b/test/unit/config/sfSimpleYamlConfigHandlerTest.php index 00227529b..267902fed 100644 --- a/test/unit/config/sfSimpleYamlConfigHandlerTest.php +++ b/test/unit/config/sfSimpleYamlConfigHandlerTest.php @@ -8,14 +8,14 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); $config = new sfSimpleYamlConfigHandler(); $config->initialize(); -$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfSimpleYamlConfigHandler'.DIRECTORY_SEPARATOR; +$dir = __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'sfSimpleYamlConfigHandler'.DIRECTORY_SEPARATOR; $array = get_retval($config, array($dir.'config.yml')); $t->is($array['article']['title'], 'foo', '->execute() returns configuration file as an array'); diff --git a/test/unit/config/sfViewConfigHandlerTest.php b/test/unit/config/sfViewConfigHandlerTest.php index 2506327d9..d62743a96 100644 --- a/test/unit/config/sfViewConfigHandlerTest.php +++ b/test/unit/config/sfViewConfigHandlerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(22); diff --git a/test/unit/config/sfYamlConfigHandlerTest.php b/test/unit/config/sfYamlConfigHandlerTest.php index 892872a0f..4a8aed384 100644 --- a/test/unit/config/sfYamlConfigHandlerTest.php +++ b/test/unit/config/sfYamlConfigHandlerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/controller/sfControllerTest.php b/test/unit/controller/sfControllerTest.php index 9a0d9a3d3..fcbb62877 100644 --- a/test/unit/controller/sfControllerTest.php +++ b/test/unit/controller/sfControllerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(2); diff --git a/test/unit/controller/sfWebControllerTest.php b/test/unit/controller/sfWebControllerTest.php index 27f36bc0e..a433e5b17 100644 --- a/test/unit/controller/sfWebControllerTest.php +++ b/test/unit/controller/sfWebControllerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); require_once($_test_dir.'/unit/sfNoRouting.class.php'); diff --git a/test/unit/database/sfDatabaseTest.php b/test/unit/database/sfDatabaseTest.php index 17c4b3642..ef13767f8 100644 --- a/test/unit/database/sfDatabaseTest.php +++ b/test/unit/database/sfDatabaseTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(10); diff --git a/test/unit/debug/sfDebugTest.php b/test/unit/debug/sfDebugTest.php index 70bca7bca..d1a76fe32 100644 --- a/test/unit/debug/sfDebugTest.php +++ b/test/unit/debug/sfDebugTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); @@ -16,4 +16,4 @@ $t->diag('::removeObjects()'); $objectArray = array('foo', 42, new sfDebug(), array('bar', 23, new lime_test(null))); $cleanedArray = array('foo', 42, 'sfDebug Object()', array('bar', 23, 'lime_test Object()')); -$t->is_deeply(sfDebug::removeObjects($objectArray), $cleanedArray, '::removeObjects() converts objects to String representations using the class name'); \ No newline at end of file +$t->is_deeply(sfDebug::removeObjects($objectArray), $cleanedArray, '::removeObjects() converts objects to String representations using the class name'); diff --git a/test/unit/debug/sfTimerTest.php b/test/unit/debug/sfTimerTest.php index 59058fea6..92540224a 100644 --- a/test/unit/debug/sfTimerTest.php +++ b/test/unit/debug/sfTimerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(6); @@ -28,4 +28,4 @@ $t->is(count($timers), 2, '::getTimers() returns an array with the timers created by the timer manager'); $t->is($timers['timerA'], $timerA, '::getTimers() returns an array with keys being the timer name'); sfTimerManager::clearTimers(); -$t->is(count(sfTimerManager::getTimers()), 0, '::clearTimers() empties the list of the timer instances'); \ No newline at end of file +$t->is(count(sfTimerManager::getTimers()), 0, '::clearTimers() empties the list of the timer instances'); diff --git a/test/unit/debug/sfWebDebugTest.php b/test/unit/debug/sfWebDebugTest.php index ac6c16dba..85df62484 100644 --- a/test/unit/debug/sfWebDebugTest.php +++ b/test/unit/debug/sfWebDebugTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; $t = new lime_test(10); diff --git a/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php b/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php index bed42dbe5..63b12489f 100644 --- a/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php +++ b/test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php @@ -8,15 +8,15 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../lib/vendor/lime/lime.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaper.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'); +require_once(__DIR__.'/../../../lib/vendor/lime/lime.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaper.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/EscapingHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/config/sfConfig.class.php'); +require_once(__DIR__.'/../../../lib/helper/EscapingHelper.php'); +require_once(__DIR__.'/../../../lib/config/sfConfig.class.php'); class sfException extends Exception { diff --git a/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php b/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php index c87650520..967bde98a 100644 --- a/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php +++ b/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php @@ -8,15 +8,15 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../lib/vendor/lime/lime.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaper.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'); - -require_once(dirname(__FILE__).'/../../../lib/helper/EscapingHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/config/sfConfig.class.php'); +require_once(__DIR__.'/../../../lib/vendor/lime/lime.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaper.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'); + +require_once(__DIR__.'/../../../lib/helper/EscapingHelper.php'); +require_once(__DIR__.'/../../../lib/config/sfConfig.class.php'); class sfException extends Exception { diff --git a/test/unit/escaper/sfOutputEscaperSafeTest.php b/test/unit/escaper/sfOutputEscaperSafeTest.php index 13b4e861a..b25079b6e 100644 --- a/test/unit/escaper/sfOutputEscaperSafeTest.php +++ b/test/unit/escaper/sfOutputEscaperSafeTest.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../lib/vendor/lime/lime.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/EscapingHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperSafe.class.php'); +require_once(__DIR__.'/../../../lib/vendor/lime/lime.php'); +require_once(__DIR__.'/../../../lib/helper/EscapingHelper.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperSafe.class.php'); $t = new lime_test(13); diff --git a/test/unit/escaper/sfOutputEscaperTest.php b/test/unit/escaper/sfOutputEscaperTest.php index 1f05f334f..9d96acd0f 100644 --- a/test/unit/escaper/sfOutputEscaperTest.php +++ b/test/unit/escaper/sfOutputEscaperTest.php @@ -8,16 +8,16 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../lib/vendor/lime/lime.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaper.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'); -require_once(dirname(__FILE__).'/../../../lib/escaper/sfOutputEscaperSafe.class.php'); - -require_once(dirname(__FILE__).'/../../../lib/helper/EscapingHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/config/sfConfig.class.php'); +require_once(__DIR__.'/../../../lib/vendor/lime/lime.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaper.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperGetterDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperArrayDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperObjectDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperIteratorDecorator.class.php'); +require_once(__DIR__.'/../../../lib/escaper/sfOutputEscaperSafe.class.php'); + +require_once(__DIR__.'/../../../lib/helper/EscapingHelper.php'); +require_once(__DIR__.'/../../../lib/config/sfConfig.class.php'); sfConfig::set('sf_charset', 'UTF-8'); diff --git a/test/unit/event/sfEventDispatcherTest.php b/test/unit/event/sfEventDispatcherTest.php index db7ae8da1..dcfe99717 100644 --- a/test/unit/event/sfEventDispatcherTest.php +++ b/test/unit/event/sfEventDispatcherTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(19); diff --git a/test/unit/event/sfEventTest.php b/test/unit/event/sfEventTest.php index caed1e3cf..48b6ea9c1 100644 --- a/test/unit/event/sfEventTest.php +++ b/test/unit/event/sfEventTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(11); diff --git a/test/unit/exception/sfExceptionsTest.php b/test/unit/exception/sfExceptionsTest.php index 1ed8e6e75..af8a35e98 100644 --- a/test/unit/exception/sfExceptionsTest.php +++ b/test/unit/exception/sfExceptionsTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(24); diff --git a/test/unit/filter/sfFilterTest.php b/test/unit/filter/sfFilterTest.php index f924eca14..50d5bd120 100644 --- a/test/unit/filter/sfFilterTest.php +++ b/test/unit/filter/sfFilterTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(17); diff --git a/test/unit/form/addon/sfFormSymfonyTest.php b/test/unit/form/addon/sfFormSymfonyTest.php index b722e822f..0c2f90efd 100644 --- a/test/unit/form/addon/sfFormSymfonyTest.php +++ b/test/unit/form/addon/sfFormSymfonyTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(8); diff --git a/test/unit/form/sfFormFieldSchemaTest.php b/test/unit/form/sfFormFieldSchemaTest.php index af4ef2131..13f1f89be 100644 --- a/test/unit/form/sfFormFieldSchemaTest.php +++ b/test/unit/form/sfFormFieldSchemaTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(11); diff --git a/test/unit/form/sfFormFieldTest.php b/test/unit/form/sfFormFieldTest.php index e52dddde1..1c8687dc8 100644 --- a/test/unit/form/sfFormFieldTest.php +++ b/test/unit/form/sfFormFieldTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(31); diff --git a/test/unit/form/sfFormTest.php b/test/unit/form/sfFormTest.php index 8d601c5d6..1fd7e0443 100644 --- a/test/unit/form/sfFormTest.php +++ b/test/unit/form/sfFormTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(155); diff --git a/test/unit/generator/sfGeneratorTest.php b/test/unit/generator/sfGeneratorTest.php index b5f4d4dbf..94f0fcbb4 100644 --- a/test/unit/generator/sfGeneratorTest.php +++ b/test/unit/generator/sfGeneratorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(0); diff --git a/test/unit/generator/sfModelGeneratorConfigurationFieldTest.php b/test/unit/generator/sfModelGeneratorConfigurationFieldTest.php index 3a4c578ed..3b986e461 100644 --- a/test/unit/generator/sfModelGeneratorConfigurationFieldTest.php +++ b/test/unit/generator/sfModelGeneratorConfigurationFieldTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; $t = new lime_test(12); diff --git a/test/unit/helper/AssetHelperTest.php b/test/unit/helper/AssetHelperTest.php index 0a2bbb4e1..91b09a8e3 100644 --- a/test/unit/helper/AssetHelperTest.php +++ b/test/unit/helper/AssetHelperTest.php @@ -8,12 +8,12 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/TagHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/UrlHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/AssetHelper.php'); +require_once(__DIR__.'/../../../lib/helper/TagHelper.php'); +require_once(__DIR__.'/../../../lib/helper/UrlHelper.php'); +require_once(__DIR__.'/../../../lib/helper/AssetHelper.php'); $t = new lime_test(68); diff --git a/test/unit/helper/DateHelperTest.php b/test/unit/helper/DateHelperTest.php index 760c543f6..03303b924 100644 --- a/test/unit/helper/DateHelperTest.php +++ b/test/unit/helper/DateHelperTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(592); @@ -27,9 +27,9 @@ public function getCulture() $context = sfContext::getInstance(array('user' => 'sfUser')); -require_once(dirname(__FILE__).'/../../../lib/helper/UrlHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/TagHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/DateHelper.php'); +require_once(__DIR__.'/../../../lib/helper/UrlHelper.php'); +require_once(__DIR__.'/../../../lib/helper/TagHelper.php'); +require_once(__DIR__.'/../../../lib/helper/DateHelper.php'); // get a fixed timestamp to test with $now = time(); diff --git a/test/unit/helper/EscapingHelperTest.php b/test/unit/helper/EscapingHelperTest.php index 364bfe9bc..b03948af6 100644 --- a/test/unit/helper/EscapingHelperTest.php +++ b/test/unit/helper/EscapingHelperTest.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/EscapingHelper.php'); +require_once(__DIR__.'/../../../lib/helper/EscapingHelper.php'); $t = new lime_test(11); @@ -41,4 +41,4 @@ world') EOF; $t->is(esc_js_no_entities(fix_linebreaks($output)), 'alert(\\\'hello\\nworld\\\')', 'esc_js_no_entities() handles linebreaks correctly'); -$t->is(esc_js_no_entities("alert('hello\nworld')"), 'alert(\\\'hello\\nworld\\\')', 'esc_js_no_entities() handles linebreaks correctly'); \ No newline at end of file +$t->is(esc_js_no_entities("alert('hello\nworld')"), 'alert(\\\'hello\\nworld\\\')', 'esc_js_no_entities() handles linebreaks correctly'); diff --git a/test/unit/helper/JavascriptBaseHelperTest.php b/test/unit/helper/JavascriptBaseHelperTest.php index 7bf6ccfd9..a15a5848a 100644 --- a/test/unit/helper/JavascriptBaseHelperTest.php +++ b/test/unit/helper/JavascriptBaseHelperTest.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/TagHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/JavascriptBaseHelper.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../lib/helper/TagHelper.php'); +require_once(__DIR__.'/../../../lib/helper/JavascriptBaseHelper.php'); $t = new lime_test(9, new lime_output_color()); @@ -41,4 +41,4 @@ $t->diag('link_to_function()'); $t->is(link_to_function('foo', 'alert(\'bar\')'), 'foo', 'link_to_function generates a link with onClick handler for function'); //#4152 -$t->is(link_to_function('foo', 'alert(\'bar\')', array('confirm' => 'sure?')), 'foo', 'link_to_function works fine with confirm dialog'); \ No newline at end of file +$t->is(link_to_function('foo', 'alert(\'bar\')', array('confirm' => 'sure?')), 'foo', 'link_to_function works fine with confirm dialog'); diff --git a/test/unit/helper/NumberHelperTest.php b/test/unit/helper/NumberHelperTest.php index 963f1dc1b..6976f4ec0 100644 --- a/test/unit/helper/NumberHelperTest.php +++ b/test/unit/helper/NumberHelperTest.php @@ -8,8 +8,8 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/NumberHelper.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../lib/helper/NumberHelper.php'); $t = new lime_test(12); diff --git a/test/unit/helper/PartialHelperTest.php b/test/unit/helper/PartialHelperTest.php index 4407997b8..507aa34b5 100644 --- a/test/unit/helper/PartialHelperTest.php +++ b/test/unit/helper/PartialHelperTest.php @@ -8,9 +8,9 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/PartialHelper.php'); +require_once(__DIR__.'/../../../lib/helper/PartialHelper.php'); // Fixme: make this test more beautiful and extend it @@ -61,4 +61,4 @@ public function setPartialVars(array $partialVars) ob_start(); include_slot('doo', 'zoo'); -$t->is(ob_get_clean(), 'zoo', 'include_slot() prints out the default content specified for an unexisting slot'); \ No newline at end of file +$t->is(ob_get_clean(), 'zoo', 'include_slot() prints out the default content specified for an unexisting slot'); diff --git a/test/unit/helper/TagHelperTest.php b/test/unit/helper/TagHelperTest.php index 1353e3942..d8930979c 100644 --- a/test/unit/helper/TagHelperTest.php +++ b/test/unit/helper/TagHelperTest.php @@ -8,14 +8,14 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(21); $context = sfContext::getInstance(); -require_once(dirname(__FILE__).'/../../../lib/helper/TagHelper.php'); +require_once(__DIR__.'/../../../lib/helper/TagHelper.php'); // tag() $t->diag('tag()'); diff --git a/test/unit/helper/TextHelperTest.php b/test/unit/helper/TextHelperTest.php index 4dd0504e5..9d111eb84 100644 --- a/test/unit/helper/TextHelperTest.php +++ b/test/unit/helper/TextHelperTest.php @@ -8,10 +8,10 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../test/bootstrap/unit.php'); +require_once(__DIR__.'/../../../test/bootstrap/unit.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/TagHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/TextHelper.php'); +require_once(__DIR__.'/../../../lib/helper/TagHelper.php'); +require_once(__DIR__.'/../../../lib/helper/TextHelper.php'); $t = new lime_test(60); diff --git a/test/unit/helper/UrlHelperTest.php b/test/unit/helper/UrlHelperTest.php index 52d9c256f..e97862d99 100644 --- a/test/unit/helper/UrlHelperTest.php +++ b/test/unit/helper/UrlHelperTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); class myController @@ -52,9 +52,9 @@ public function getCSRFToken($secret = null) $context = sfContext::getInstance(array('controller' => 'myController', 'request' => 'myRequest')); -require_once(dirname(__FILE__).'/../../../lib/helper/AssetHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/UrlHelper.php'); -require_once(dirname(__FILE__).'/../../../lib/helper/TagHelper.php'); +require_once(__DIR__.'/../../../lib/helper/AssetHelper.php'); +require_once(__DIR__.'/../../../lib/helper/UrlHelper.php'); +require_once(__DIR__.'/../../../lib/helper/TagHelper.php'); // url_for() $t->diag('url_for()'); diff --git a/test/unit/i18n/dataTest.php b/test/unit/i18n/dataTest.php index 2a666c177..b731ab72a 100644 --- a/test/unit/i18n/dataTest.php +++ b/test/unit/i18n/dataTest.php @@ -8,12 +8,12 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(92); $t->diag('i18n data'); -$en = unserialize(file_get_contents(dirname(__FILE__).'/../../../lib/i18n/data/en.dat')); +$en = unserialize(file_get_contents(__DIR__.'/../../../lib/i18n/data/en.dat')); // check main keys foreach (array('Countries', 'Currencies', 'Languages', 'LocaleScript', 'NumberPatterns', 'Scripts', 'Types', 'Variants', 'Version', 'calendar', 'zoneStrings') as $entry) diff --git a/test/unit/i18n/extract/sfI18nExtractTest.php b/test/unit/i18n/extract/sfI18nExtractTest.php index 7c84f1853..334692ca9 100644 --- a/test/unit/i18n/extract/sfI18nExtractTest.php +++ b/test/unit/i18n/extract/sfI18nExtractTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(3); @@ -20,7 +20,7 @@ class TestConfiguration extends sfApplicationConfiguration { public function getI18NGlobalDirs() { - return array(dirname(__FILE__).'/../fixtures'); + return array(__DIR__.'/../fixtures'); } } diff --git a/test/unit/i18n/extract/sfI18nPhpExtractorTest.php b/test/unit/i18n/extract/sfI18nPhpExtractorTest.php index a73dd7056..04f194cb0 100644 --- a/test/unit/i18n/extract/sfI18nPhpExtractorTest.php +++ b/test/unit/i18n/extract/sfI18nPhpExtractorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/i18n/extract/sfI18nYamlGeneratorExtractorTest.php b/test/unit/i18n/extract/sfI18nYamlGeneratorExtractorTest.php index 4dc060beb..d612b8395 100644 --- a/test/unit/i18n/extract/sfI18nYamlGeneratorExtractorTest.php +++ b/test/unit/i18n/extract/sfI18nYamlGeneratorExtractorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(3); diff --git a/test/unit/i18n/extract/sfI18nYamlValidateExtractorTest.php b/test/unit/i18n/extract/sfI18nYamlValidateExtractorTest.php index 37eee57eb..22d57b85d 100644 --- a/test/unit/i18n/extract/sfI18nYamlValidateExtractorTest.php +++ b/test/unit/i18n/extract/sfI18nYamlValidateExtractorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/i18n/sfChoiceFormatTest.php b/test/unit/i18n/sfChoiceFormatTest.php index 173fa4492..e8a46b95a 100644 --- a/test/unit/i18n/sfChoiceFormatTest.php +++ b/test/unit/i18n/sfChoiceFormatTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(90); diff --git a/test/unit/i18n/sfCultureInfoTest.php b/test/unit/i18n/sfCultureInfoTest.php index b0d1fe102..f45c2df41 100644 --- a/test/unit/i18n/sfCultureInfoTest.php +++ b/test/unit/i18n/sfCultureInfoTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(67); diff --git a/test/unit/i18n/sfI18NTest.php b/test/unit/i18n/sfI18NTest.php index d8439c6dd..4117ee033 100644 --- a/test/unit/i18n/sfI18NTest.php +++ b/test/unit/i18n/sfI18NTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(34); @@ -20,7 +20,7 @@ class TestConfiguration extends sfApplicationConfiguration { public function getI18NGlobalDirs() { - return array(dirname(__FILE__).'/fixtures'); + return array(__DIR__.'/fixtures'); } } diff --git a/test/unit/i18n/sfMessageSourceTest.php b/test/unit/i18n/sfMessageSourceTest.php index 077675e39..f259ec408 100644 --- a/test/unit/i18n/sfMessageSourceTest.php +++ b/test/unit/i18n/sfMessageSourceTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(3); diff --git a/test/unit/i18n/sfMessageSource_AggregateTest.php b/test/unit/i18n/sfMessageSource_AggregateTest.php index 45ca4d6ef..e853137b3 100644 --- a/test/unit/i18n/sfMessageSource_AggregateTest.php +++ b/test/unit/i18n/sfMessageSource_AggregateTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(9); @@ -22,8 +22,8 @@ mkdir($temp2); // copy fixtures to tmp directory -copy(dirname(__FILE__).'/fixtures/messages.fr.xml', $temp1.'/messages.fr.xml'); -copy(dirname(__FILE__).'/fixtures/messages_bis.fr.xml', $temp2.'/messages.fr.xml'); +copy(__DIR__.'/fixtures/messages.fr.xml', $temp1.'/messages.fr.xml'); +copy(__DIR__.'/fixtures/messages_bis.fr.xml', $temp2.'/messages.fr.xml'); $source = get_source($temp1, $temp2); $source->setCulture('fr_FR'); diff --git a/test/unit/i18n/sfMessageSource_FileTest.php b/test/unit/i18n/sfMessageSource_FileTest.php index 8de1b6319..5bd44855b 100644 --- a/test/unit/i18n/sfMessageSource_FileTest.php +++ b/test/unit/i18n/sfMessageSource_FileTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(7); @@ -26,7 +26,7 @@ public function getCatalogueByDir($catalogue) } } -$source = sfMessageSource::factory('Simple', dirname(__FILE__).'/fixtures'); +$source = sfMessageSource::factory('Simple', __DIR__.'/fixtures'); $source->setCulture('fr_FR'); // ->getCatalogueByDir() @@ -39,7 +39,7 @@ public function getCatalogueByDir($catalogue) // ->getSource() $t->diag('->getSource()'); -$t->is($source->getSource('fr_FR/messages.xml'), dirname(__FILE__).'/fixtures/fr_FR/messages.xml', '->getSource() returns the full path name to a specific variant'); +$t->is($source->getSource('fr_FR/messages.xml'), __DIR__.'/fixtures/fr_FR/messages.xml', '->getSource() returns the full path name to a specific variant'); // ->isValidSource() $t->diag('->isValidSource()'); diff --git a/test/unit/i18n/sfMessageSource_SQLiteTest.php b/test/unit/i18n/sfMessageSource_SQLiteTest.php index 6a36e60af..6e71be1fa 100644 --- a/test/unit/i18n/sfMessageSource_SQLiteTest.php +++ b/test/unit/i18n/sfMessageSource_SQLiteTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $plan = 10; $t = new lime_test($plan); @@ -20,7 +20,7 @@ } // setup -$temp = dirname(__FILE__).'/'.rand(11111, 99999); +$temp = __DIR__.'/'.rand(11111, 99999); sf_test_shutdown(); register_shutdown_function('sf_test_shutdown'); diff --git a/test/unit/i18n/sfMessageSource_XLIFFTest.php b/test/unit/i18n/sfMessageSource_XLIFFTest.php index 6b5a8e384..8c4abe6f1 100644 --- a/test/unit/i18n/sfMessageSource_XLIFFTest.php +++ b/test/unit/i18n/sfMessageSource_XLIFFTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(11); @@ -18,7 +18,7 @@ mkdir($temp); // copy fixtures to tmp directory -copy(dirname(__FILE__).'/fixtures/messages.fr.xml', $temp.'/messages.fr.xml'); +copy(__DIR__.'/fixtures/messages.fr.xml', $temp.'/messages.fr.xml'); $source = sfMessageSource::factory('XLIFF', $temp); $source->setCulture('fr_FR'); diff --git a/test/unit/i18n/sfNumberFormatInfoTest.php b/test/unit/i18n/sfNumberFormatInfoTest.php index 1abc80edb..641fde3fa 100644 --- a/test/unit/i18n/sfNumberFormatInfoTest.php +++ b/test/unit/i18n/sfNumberFormatInfoTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(75); diff --git a/test/unit/log/sfAggregateLoggerTest.php b/test/unit/log/sfAggregateLoggerTest.php index 3b4910ad6..550249d76 100644 --- a/test/unit/log/sfAggregateLoggerTest.php +++ b/test/unit/log/sfAggregateLoggerTest.php @@ -8,13 +8,13 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(6); $dispatcher = new sfEventDispatcher(); -require_once(dirname(__FILE__).'/../../../lib/util/sfToolkit.class.php'); +require_once(__DIR__.'/../../../lib/util/sfToolkit.class.php'); $file = sys_get_temp_dir().DIRECTORY_SEPARATOR.'sf_log_file.txt'; if (file_exists($file)) { diff --git a/test/unit/log/sfConsoleLoggerTest.php b/test/unit/log/sfConsoleLoggerTest.php index 03e276f3c..e694aa01c 100644 --- a/test/unit/log/sfConsoleLoggerTest.php +++ b/test/unit/log/sfConsoleLoggerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/log/sfFileLoggerTest.php b/test/unit/log/sfFileLoggerTest.php index 57ccfd8ce..81fa52a58 100644 --- a/test/unit/log/sfFileLoggerTest.php +++ b/test/unit/log/sfFileLoggerTest.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(7); -require_once(dirname(__FILE__).'/../../../lib/util/sfToolkit.class.php'); +require_once(__DIR__.'/../../../lib/util/sfToolkit.class.php'); $file = sys_get_temp_dir().DIRECTORY_SEPARATOR.'sf_log_file.txt'; if (file_exists($file)) { diff --git a/test/unit/log/sfLoggerTest.php b/test/unit/log/sfLoggerTest.php index 606731665..23d21ef21 100644 --- a/test/unit/log/sfLoggerTest.php +++ b/test/unit/log/sfLoggerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(136); diff --git a/test/unit/log/sfLoggerWrapperTest.php b/test/unit/log/sfLoggerWrapperTest.php index 061678b49..f3def97ce 100644 --- a/test/unit/log/sfLoggerWrapperTest.php +++ b/test/unit/log/sfLoggerWrapperTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/log/sfStreamLoggerTest.php b/test/unit/log/sfStreamLoggerTest.php index b0c541de8..ce8dadd15 100644 --- a/test/unit/log/sfStreamLoggerTest.php +++ b/test/unit/log/sfStreamLoggerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/log/sfVarLoggerTest.php b/test/unit/log/sfVarLoggerTest.php index 7083ac5a1..946e7b7f5 100644 --- a/test/unit/log/sfVarLoggerTest.php +++ b/test/unit/log/sfVarLoggerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(9); diff --git a/test/unit/log/sfWebDebugLoggerTest.php b/test/unit/log/sfWebDebugLoggerTest.php index fed9b405c..2c7bd5928 100644 --- a/test/unit/log/sfWebDebugLoggerTest.php +++ b/test/unit/log/sfWebDebugLoggerTest.php @@ -8,8 +8,8 @@ * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; -require_once dirname(__FILE__).'/../sfContextMock.class.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; +require_once __DIR__.'/../sfContextMock.class.php'; $t = new lime_test(1); diff --git a/test/unit/mailer/sfMailerTest.php b/test/unit/mailer/sfMailerTest.php index c49dc14a1..4c1939010 100755 --- a/test/unit/mailer/sfMailerTest.php +++ b/test/unit/mailer/sfMailerTest.php @@ -7,12 +7,12 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -require_once dirname(__FILE__) . '/../../bootstrap/unit.php'; +require_once __DIR__ . '/../../bootstrap/unit.php'; require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/lib/classes/Swift.php'; Swift::registerAutoload(sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/lib/swift_init.php'); -require_once dirname(__FILE__).'/fixtures/TestMailerTransport.class.php'; -require_once dirname(__FILE__).'/fixtures/TestSpool.class.php'; -require_once dirname(__FILE__).'/fixtures/TestMailMessage.class.php'; +require_once __DIR__.'/fixtures/TestMailerTransport.class.php'; +require_once __DIR__.'/fixtures/TestSpool.class.php'; +require_once __DIR__.'/fixtures/TestMailMessage.class.php'; $t = new lime_test(34); diff --git a/test/unit/plugin/sfPearEnvironmentTest.php b/test/unit/plugin/sfPearEnvironmentTest.php index e35b359d6..4f54c8996 100644 --- a/test/unit/plugin/sfPearEnvironmentTest.php +++ b/test/unit/plugin/sfPearEnvironmentTest.php @@ -10,7 +10,7 @@ error_reporting(error_reporting() & ~E_STRICT); -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(3); @@ -21,9 +21,9 @@ return; } -require_once dirname(__FILE__).'/sfPearDownloaderTest.class.php'; -require_once dirname(__FILE__).'/sfPearRestTest.class.php'; -require_once dirname(__FILE__).'/sfPluginTestHelper.class.php'; +require_once __DIR__.'/sfPearDownloaderTest.class.php'; +require_once __DIR__.'/sfPearRestTest.class.php'; +require_once __DIR__.'/sfPluginTestHelper.class.php'; // setup $temp = tempnam('/tmp/sf_plugin_test', 'tmp'); diff --git a/test/unit/plugin/sfPearRestPluginTest.php b/test/unit/plugin/sfPearRestPluginTest.php index 98fd4fff6..b511055d9 100644 --- a/test/unit/plugin/sfPearRestPluginTest.php +++ b/test/unit/plugin/sfPearRestPluginTest.php @@ -10,7 +10,7 @@ error_reporting(error_reporting() & ~E_STRICT); -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(5); @@ -21,9 +21,9 @@ return; } -require_once dirname(__FILE__).'/sfPearDownloaderTest.class.php'; -require_once dirname(__FILE__).'/sfPearRestTest.class.php'; -require_once dirname(__FILE__).'/sfPluginTestHelper.class.php'; +require_once __DIR__.'/sfPearDownloaderTest.class.php'; +require_once __DIR__.'/sfPearRestTest.class.php'; +require_once __DIR__.'/sfPluginTestHelper.class.php'; // setup $temp = tempnam('/tmp/sf_plugin_test', 'tmp'); diff --git a/test/unit/plugin/sfPluginManagerTest.php b/test/unit/plugin/sfPluginManagerTest.php index 510bd47b5..76cd7e394 100644 --- a/test/unit/plugin/sfPluginManagerTest.php +++ b/test/unit/plugin/sfPluginManagerTest.php @@ -10,7 +10,7 @@ error_reporting(error_reporting() & ~E_STRICT); -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(40); @@ -21,9 +21,9 @@ return; } -require_once dirname(__FILE__).'/sfPearDownloaderTest.class.php'; -require_once dirname(__FILE__).'/sfPearRestTest.class.php'; -require_once dirname(__FILE__).'/sfPluginTestHelper.class.php'; +require_once __DIR__.'/sfPearDownloaderTest.class.php'; +require_once __DIR__.'/sfPearRestTest.class.php'; +require_once __DIR__.'/sfPluginTestHelper.class.php'; // setup $temp = tempnam('/tmp/sf_plugin_test', 'tmp'); @@ -170,7 +170,7 @@ protected function isPluginCompatibleWithDependency($dependency) $t->ok($pluginManager->uninstallPlugin('sfTestPlugin'), '->uninstallPlugin() returns true if the plugin is properly uninstalled'); $t->ok(!is_file($temp.'/plugins/sfTestPlugin/VERSION'), '->uninstallPlugin() uninstalls a plugin'); -$pluginManager->installPlugin(dirname(__FILE__).'/fixtures/http/pear.example.com/get/sfTestPlugin/sfTestPlugin-1.1.4.tgz'); +$pluginManager->installPlugin(__DIR__.'/fixtures/http/pear.example.com/get/sfTestPlugin/sfTestPlugin-1.1.4.tgz'); $t->is(file_get_contents($temp.'/plugins/sfTestPlugin/VERSION'), '1.1.4', '->installPlugin() can install a local PEAR package'); $t->ok($pluginManager->uninstallPlugin('sfTestPlugin'), '->uninstallPlugin() returns true if the plugin is properly uninstalled'); diff --git a/test/unit/plugin/sfPluginTestHelper.class.php b/test/unit/plugin/sfPluginTestHelper.class.php index bcc8508de..102fc09be 100644 --- a/test/unit/plugin/sfPluginTestHelper.class.php +++ b/test/unit/plugin/sfPluginTestHelper.class.php @@ -16,12 +16,12 @@ static public function convertUrlToFixture($url) mkdir(dirname($dest), 0777, true); } - if (!file_exists(dirname(__FILE__).'/fixtures/'.$dir.'/'.$file)) + if (!file_exists(__DIR__.'/fixtures/'.$dir.'/'.$file)) { throw new sfException(sprintf('Unable to find fixture for %s (%s)', $url, $file)); } - copy(dirname(__FILE__).'/fixtures/'.$dir.'/'.$file, $dest); + copy(__DIR__.'/fixtures/'.$dir.'/'.$file, $dest); return $dest; } diff --git a/test/unit/request/sfRequestTest.php b/test/unit/request/sfRequestTest.php index 36f6ed886..f91fd1941 100755 --- a/test/unit/request/sfRequestTest.php +++ b/test/unit/request/sfRequestTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class myRequest extends sfRequest { diff --git a/test/unit/request/sfWebRequestTest.php b/test/unit/request/sfWebRequestTest.php index 118d6b616..de2a38529 100644 --- a/test/unit/request/sfWebRequestTest.php +++ b/test/unit/request/sfWebRequestTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(109); diff --git a/test/unit/response/sfResponseTest.php b/test/unit/response/sfResponseTest.php index 61a9c6cd5..31aad5842 100644 --- a/test/unit/response/sfResponseTest.php +++ b/test/unit/response/sfResponseTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class myResponse extends sfResponse { diff --git a/test/unit/response/sfWebResponseTest.php b/test/unit/response/sfWebResponseTest.php index f1ffbad21..0697da8d8 100644 --- a/test/unit/response/sfWebResponseTest.php +++ b/test/unit/response/sfWebResponseTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(89); diff --git a/test/unit/routing/sfObjectRouteCollectionTest.php b/test/unit/routing/sfObjectRouteCollectionTest.php index d7c9418af..6d949f242 100644 --- a/test/unit/routing/sfObjectRouteCollectionTest.php +++ b/test/unit/routing/sfObjectRouteCollectionTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(25); diff --git a/test/unit/routing/sfObjectRouteTest.php b/test/unit/routing/sfObjectRouteTest.php index 09e660f36..441d753f0 100644 --- a/test/unit/routing/sfObjectRouteTest.php +++ b/test/unit/routing/sfObjectRouteTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/routing/sfPatternRoutingTest.php b/test/unit/routing/sfPatternRoutingTest.php index 9b3774294..20398fbe6 100644 --- a/test/unit/routing/sfPatternRoutingTest.php +++ b/test/unit/routing/sfPatternRoutingTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(149); @@ -41,7 +41,7 @@ public function isRouteLoaded($name) protected function getConfigFileName() { - return dirname(__FILE__).'/fixtures/config_routing.yml.php'; + return __DIR__.'/fixtures/config_routing.yml.php'; } } diff --git a/test/unit/routing/sfRequestRouteTest.php b/test/unit/routing/sfRequestRouteTest.php index 765b04df5..811fcfb51 100644 --- a/test/unit/routing/sfRequestRouteTest.php +++ b/test/unit/routing/sfRequestRouteTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(8); diff --git a/test/unit/routing/sfRouteTest.php b/test/unit/routing/sfRouteTest.php index 3ad99537f..ff50cee0b 100644 --- a/test/unit/routing/sfRouteTest.php +++ b/test/unit/routing/sfRouteTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(65); @@ -270,4 +270,4 @@ public function isCompiled() $options = $route->getOptions(); $t->is($options['options'], 'bar', '->getOptions() compiles the route and returns the compiled options'); $t->is(count($options) > 1, true, '->getOptions() compiles the route and returns many compiled options'); -$t->is($route->isCompiled(), true, '->getOptions() compiles the route and returns compiled options'); \ No newline at end of file +$t->is($route->isCompiled(), true, '->getOptions() compiles the route and returns compiled options'); diff --git a/test/unit/service/fixtures/containers/container10.php b/test/unit/service/fixtures/containers/container10.php index befee938c..99b200a34 100644 --- a/test/unit/service/fixtures/containers/container10.php +++ b/test/unit/service/fixtures/containers/container10.php @@ -1,6 +1,6 @@ diff --git a/test/unit/service/fixtures/containers/container9.php b/test/unit/service/fixtures/containers/container9.php index afb30ceeb..c787ffa87 100644 --- a/test/unit/service/fixtures/containers/container9.php +++ b/test/unit/service/fixtures/containers/container9.php @@ -1,13 +1,13 @@ register('foo', 'FooClass')-> setConstructor('getInstance')-> setArguments(array('foo', new sfServiceReference('foo.baz'), array('%foo%' => 'foo is %foo%'), true, new sfServiceReference('service_container')))-> - setFile(realpath(dirname(__FILE__).'/../includes/foo.php'))-> + setFile(realpath(__DIR__.'/../includes/foo.php'))-> setShared(false)-> addMethodCall('setBar', array('bar'))-> addMethodCall('initialize')-> diff --git a/test/unit/service/sfServiceContainerBuilderTest.php b/test/unit/service/sfServiceContainerBuilderTest.php index 1601a6f2a..85db8a138 100644 --- a/test/unit/service/sfServiceContainerBuilderTest.php +++ b/test/unit/service/sfServiceContainerBuilderTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(48); @@ -124,9 +124,9 @@ // ->createService() # file $t->diag('->createService() # file'); $builder = new sfServiceContainerBuilder(); -$builder->register('foo1', 'FooClass')->setFile(dirname(__FILE__).'/fixtures/includes/foo.php'); +$builder->register('foo1', 'FooClass')->setFile(__DIR__.'/fixtures/includes/foo.php'); $t->ok($builder->getService('foo1'), '->createService() requires the file defined by the service definition'); -$builder->register('foo2', 'FooClass')->setFile(dirname(__FILE__).'/fixtures/includes/%file%.php'); +$builder->register('foo2', 'FooClass')->setFile(__DIR__.'/fixtures/includes/%file%.php'); $builder->setParameter('file', 'foo'); $t->ok($builder->getService('foo2'), '->createService() replaces parameters in the file provided by the service definition'); @@ -163,7 +163,7 @@ $t->is($builder->getService('foo1')->bar, array('bar', $builder->getService('bar')), '->createService() replaces the values in the method calls arguments'); // ->createService() # configurator -require_once dirname(__FILE__).'/fixtures/includes/classes.php'; +require_once __DIR__.'/fixtures/includes/classes.php'; $t->diag('->createService() # configurator'); $builder = new sfServiceContainerBuilder(); $builder->register('foo1', 'FooClass')->setConfigurator('sc_configure'); diff --git a/test/unit/service/sfServiceContainerDumperGraphvizTest.php b/test/unit/service/sfServiceContainerDumperGraphvizTest.php index 1ec2de6ea..69d3b10d0 100644 --- a/test/unit/service/sfServiceContainerDumperGraphvizTest.php +++ b/test/unit/service/sfServiceContainerDumperGraphvizTest.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(4); -$dir = dirname(__FILE__).'/fixtures/graphviz'; +$dir = __DIR__.'/fixtures/graphviz'; // ->dump() @@ -24,15 +24,15 @@ $container = new sfServiceContainerBuilder(); $dumper = new sfServiceContainerDumperGraphviz($container); -$container = include dirname(__FILE__).'/fixtures/containers/container9.php'; +$container = include __DIR__.'/fixtures/containers/container9.php'; $dumper = new sfServiceContainerDumperGraphviz($container); -$t->is($dumper->dump(), str_replace('%path%', dirname(__FILE__), file_get_contents($dir.'/services9.dot')), '->dump() dumps services'); +$t->is($dumper->dump(), str_replace('%path%', __DIR__, file_get_contents($dir.'/services9.dot')), '->dump() dumps services'); -$container = include dirname(__FILE__).'/fixtures/containers/container10.php'; +$container = include __DIR__.'/fixtures/containers/container10.php'; $dumper = new sfServiceContainerDumperGraphviz($container); -$t->is($dumper->dump(), str_replace('%path%', dirname(__FILE__), file_get_contents($dir.'/services10.dot')), '->dump() dumps services'); +$t->is($dumper->dump(), str_replace('%path%', __DIR__, file_get_contents($dir.'/services10.dot')), '->dump() dumps services'); -$container = include dirname(__FILE__).'/fixtures/containers/container10.php'; +$container = include __DIR__.'/fixtures/containers/container10.php'; $dumper = new sfServiceContainerDumperGraphviz($container); $t->is($dumper->dump(array( 'graph' => array('ratio' => 'normal'), @@ -41,4 +41,4 @@ 'node.instance' => array('fillcolor' => 'green', 'style' => 'empty'), 'node.definition' => array('fillcolor' => 'grey'), 'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'), -)), str_replace('%path%', dirname(__FILE__), file_get_contents($dir.'/services10-1.dot')), '->dump() dumps services'); +)), str_replace('%path%', __DIR__, file_get_contents($dir.'/services10-1.dot')), '->dump() dumps services'); diff --git a/test/unit/service/sfServiceContainerDumperPhpTest.php b/test/unit/service/sfServiceContainerDumperPhpTest.php index f8a92e029..e9abc0b10 100644 --- a/test/unit/service/sfServiceContainerDumperPhpTest.php +++ b/test/unit/service/sfServiceContainerDumperPhpTest.php @@ -8,11 +8,11 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(5); -$dir = dirname(__FILE__).'/fixtures/php'; +$dir = __DIR__.'/fixtures/php'; // ->dump() @@ -27,15 +27,15 @@ // ->addParameters() $t->diag('->addParameters()'); -$container = include dirname(__FILE__).'/fixtures/containers/container8.php'; +$container = include __DIR__.'/fixtures/containers/container8.php'; $dumper = new sfServiceContainerDumperPhp($container); $t->is($dumper->dump(), file_get_contents($dir.'/services8.php'), '->dump() dumps parameters'); // ->addService() $t->diag('->addService()'); -$container = include dirname(__FILE__).'/fixtures/containers/container9.php'; +$container = include __DIR__.'/fixtures/containers/container9.php'; $dumper = new sfServiceContainerDumperPhp($container); -$t->is($dumper->dump(), str_replace('%path%', dirname(__FILE__).'/fixtures/includes', file_get_contents($dir.'/services9.php')), '->dump() dumps services'); +$t->is($dumper->dump(), str_replace('%path%', __DIR__.'/fixtures/includes', file_get_contents($dir.'/services9.php')), '->dump() dumps services'); $dumper = new sfServiceContainerDumperPhp($container = new sfServiceContainerBuilder()); $container->register('foo', 'FooClass')->addArgument(new stdClass()); diff --git a/test/unit/service/sfServiceContainerDumperTest.php b/test/unit/service/sfServiceContainerDumperTest.php index 44338d663..8e4f44f74 100644 --- a/test/unit/service/sfServiceContainerDumperTest.php +++ b/test/unit/service/sfServiceContainerDumperTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/service/sfServiceContainerLoaderArrayTest.php b/test/unit/service/sfServiceContainerLoaderArrayTest.php index c8eaf37c3..5000013e2 100644 --- a/test/unit/service/sfServiceContainerLoaderArrayTest.php +++ b/test/unit/service/sfServiceContainerLoaderArrayTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(20); @@ -25,7 +25,7 @@ public function validate($content) // ->validate() try { - $loader->validate(sfYaml::load(dirname(__FILE__).'/fixtures/yaml/nonvalid1.yml')); + $loader->validate(sfYaml::load(__DIR__.'/fixtures/yaml/nonvalid1.yml')); $t->fail('->validate() throws an InvalidArgumentException if the loaded definition is not an array'); } catch (InvalidArgumentException $e) @@ -35,7 +35,7 @@ public function validate($content) try { - $loader->validate(sfYaml::load(dirname(__FILE__).'/fixtures/yaml/nonvalid2.yml')); + $loader->validate(sfYaml::load(__DIR__.'/fixtures/yaml/nonvalid2.yml')); $t->fail('->validate() throws an InvalidArgumentException if the loaded definition is not a valid array'); } catch (InvalidArgumentException $e) @@ -49,15 +49,15 @@ public function validate($content) list($services, $parameters) = $loader->doLoad(array()); $t->is($parameters, array(), '->load() return emty parameters array for an empty array definition'); -list($services, $parameters) = $loader->doLoad(sfYaml::load(dirname(__FILE__).'/fixtures/yaml/services2.yml')); +list($services, $parameters) = $loader->doLoad(sfYaml::load(__DIR__.'/fixtures/yaml/services2.yml')); $t->is($parameters, array('foo' => 'bar', 'values' => array(true, false, 0, 1000.3), 'bar' => 'foo', 'foo_bar' => new sfServiceReference('foo_bar')), '->load() converts array keys to lowercase'); // ->load() # services -list($services, $parameters) = $loader->doLoad(sfYaml::load(dirname(__FILE__).'/fixtures/yaml/services2.yml')); +list($services, $parameters) = $loader->doLoad(sfYaml::load(__DIR__.'/fixtures/yaml/services2.yml')); $t->is($services, array(), '->load() return emty services array for an empty array definition'); $t->diag('->load() # services'); -list($services, $parameters) = $loader->doLoad(sfYaml::load(dirname(__FILE__).'/fixtures/yaml/services3.yml')); +list($services, $parameters) = $loader->doLoad(sfYaml::load(__DIR__.'/fixtures/yaml/services3.yml')); $t->ok(isset($services['foo']), '->load() parses service elements'); $t->is(get_class($services['foo']), 'sfServiceDefinition', '->load() converts service element to sfServiceDefinition instances'); $t->is($services['foo']->getClass(), 'FooClass', '->load() parses the class attribute'); diff --git a/test/unit/service/sfServiceContainerLoaderTest.php b/test/unit/service/sfServiceContainerLoaderTest.php index 17665aec8..7dc33dc11 100644 --- a/test/unit/service/sfServiceContainerLoaderTest.php +++ b/test/unit/service/sfServiceContainerLoaderTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(11); diff --git a/test/unit/service/sfServiceContainerTest.php b/test/unit/service/sfServiceContainerTest.php index bd1f3d0c4..ae35adb3f 100644 --- a/test/unit/service/sfServiceContainerTest.php +++ b/test/unit/service/sfServiceContainerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(27); diff --git a/test/unit/service/sfServiceDefinitionTest.php b/test/unit/service/sfServiceDefinitionTest.php index 9db4e8265..5a9c98b05 100644 --- a/test/unit/service/sfServiceDefinitionTest.php +++ b/test/unit/service/sfServiceDefinitionTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(21); diff --git a/test/unit/service/sfServiceParameterTest.php b/test/unit/service/sfServiceParameterTest.php index 00c4aa053..1cd18333d 100644 --- a/test/unit/service/sfServiceParameterTest.php +++ b/test/unit/service/sfServiceParameterTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/service/sfServiceReferenceTest.php b/test/unit/service/sfServiceReferenceTest.php index 60e690fe0..19f11a36a 100644 --- a/test/unit/service/sfServiceReferenceTest.php +++ b/test/unit/service/sfServiceReferenceTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/storage/sfCacheSessionStorageTest.php b/test/unit/storage/sfCacheSessionStorageTest.php index dc0806d87..6e1c64064 100644 --- a/test/unit/storage/sfCacheSessionStorageTest.php +++ b/test/unit/storage/sfCacheSessionStorageTest.php @@ -10,9 +10,9 @@ $app = 'frontend'; -require_once(dirname(__FILE__).'/../../bootstrap/functional.php'); +require_once(__DIR__.'/../../bootstrap/functional.php'); -$_test_dir = realpath(dirname(__FILE__).'/../../'); +$_test_dir = realpath(__DIR__.'/../../'); require_once($_test_dir.'/../lib/vendor/lime/lime.php'); sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib')); diff --git a/test/unit/storage/sfMySQLStorageTest.php b/test/unit/storage/sfMySQLStorageTest.php index 4cbab2f43..8cbb0d683 100644 --- a/test/unit/storage/sfMySQLStorageTest.php +++ b/test/unit/storage/sfMySQLStorageTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); ob_start(); $plan = 16; diff --git a/test/unit/storage/sfMySQLiStorageTest.php b/test/unit/storage/sfMySQLiStorageTest.php index a54635343..ebf0ccba6 100644 --- a/test/unit/storage/sfMySQLiStorageTest.php +++ b/test/unit/storage/sfMySQLiStorageTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); ob_start(); $plan = 12; diff --git a/test/unit/storage/sfNoStorageTest.php b/test/unit/storage/sfNoStorageTest.php index c1f867b45..0fcd82f57 100644 --- a/test/unit/storage/sfNoStorageTest.php +++ b/test/unit/storage/sfNoStorageTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/storage/sfPDOSessionStorageTest.php b/test/unit/storage/sfPDOSessionStorageTest.php index bb438f842..63805e349 100644 --- a/test/unit/storage/sfPDOSessionStorageTest.php +++ b/test/unit/storage/sfPDOSessionStorageTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); ob_start(); $plan = 15; diff --git a/test/unit/storage/sfSessionStorageTest.php b/test/unit/storage/sfSessionStorageTest.php index 1b9f7f6da..ddc1f4a6b 100644 --- a/test/unit/storage/sfSessionStorageTest.php +++ b/test/unit/storage/sfSessionStorageTest.php @@ -10,11 +10,11 @@ $app = 'frontend'; -require_once(dirname(__FILE__).'/../../bootstrap/functional.php'); +require_once(__DIR__.'/../../bootstrap/functional.php'); ob_start(); -$_test_dir = realpath(dirname(__FILE__).'/../../'); +$_test_dir = realpath(__DIR__.'/../../'); require_once($_test_dir.'/../lib/vendor/lime/lime.php'); sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib')); diff --git a/test/unit/storage/sfStorageTest.php b/test/unit/storage/sfStorageTest.php index 194c062af..ab8a1dd63 100644 --- a/test/unit/storage/sfStorageTest.php +++ b/test/unit/storage/sfStorageTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(0); diff --git a/test/unit/task/cache/sfCacheClearTaskTest.php b/test/unit/task/cache/sfCacheClearTaskTest.php index f42a22aea..6f4a7c370 100644 --- a/test/unit/task/cache/sfCacheClearTaskTest.php +++ b/test/unit/task/cache/sfCacheClearTaskTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/task.php'); +require_once(__DIR__.'/../../../bootstrap/task.php'); $t = new lime_test(2); diff --git a/test/unit/task/sfBaseTaskTest.php b/test/unit/task/sfBaseTaskTest.php index 20d0ced66..7a070e3fc 100644 --- a/test/unit/task/sfBaseTaskTest.php +++ b/test/unit/task/sfBaseTaskTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -include dirname(__FILE__).'/../../bootstrap/unit.php'; +include __DIR__.'/../../bootstrap/unit.php'; require_once sfConfig::get('sf_symfony_lib_dir').'/vendor/lime/lime.php'; class TestTask extends sfBaseTask @@ -28,7 +28,7 @@ public function initializeAutoload(sfProjectConfiguration $configuration, $reloa } } -$rootDir = dirname(__FILE__).'/../../functional/fixtures'; +$rootDir = __DIR__.'/../../functional/fixtures'; sfToolkit::clearDirectory($rootDir.'/cache'); $dispatcher = new sfEventDispatcher(); diff --git a/test/unit/task/sfFilesystemTest.php b/test/unit/task/sfFilesystemTest.php index 0f678dde9..538d21580 100644 --- a/test/unit/task/sfFilesystemTest.php +++ b/test/unit/task/sfFilesystemTest.php @@ -7,7 +7,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); //lazy constant, cause it is so often used in this test define("DS", DIRECTORY_SEPARATOR); diff --git a/test/unit/task/sfTaskTest.php b/test/unit/task/sfTaskTest.php index faa3115ce..29cd0a9ba 100644 --- a/test/unit/task/sfTaskTest.php +++ b/test/unit/task/sfTaskTest.php @@ -7,7 +7,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -require_once dirname(__FILE__).'/../../bootstrap/unit.php'; +require_once __DIR__.'/../../bootstrap/unit.php'; $t = new lime_test(16); diff --git a/test/unit/test/sfTestFunctionalTest.php b/test/unit/test/sfTestFunctionalTest.php index d46466de4..667f28d06 100644 --- a/test/unit/test/sfTestFunctionalTest.php +++ b/test/unit/test/sfTestFunctionalTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/user/sfBasicSecurityUserTest.php b/test/unit/user/sfBasicSecurityUserTest.php index 08a819655..5535076a6 100644 --- a/test/unit/user/sfBasicSecurityUserTest.php +++ b/test/unit/user/sfBasicSecurityUserTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(47); diff --git a/test/unit/user/sfUserTest.php b/test/unit/user/sfUserTest.php index 2ef8b0f53..23cea5bd9 100644 --- a/test/unit/user/sfUserTest.php +++ b/test/unit/user/sfUserTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(32); diff --git a/test/unit/util/sfBrowserTest.php b/test/unit/util/sfBrowserTest.php index d5ad70a8f..42508fa12 100644 --- a/test/unit/util/sfBrowserTest.php +++ b/test/unit/util/sfBrowserTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(74); diff --git a/test/unit/util/sfCallableTest.php b/test/unit/util/sfCallableTest.php index 11bbe71d4..450fee011 100644 --- a/test/unit/util/sfCallableTest.php +++ b/test/unit/util/sfCallableTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(5); diff --git a/test/unit/util/sfClassManipulatorTest.php b/test/unit/util/sfClassManipulatorTest.php index 0d5e27251..b3c25af8b 100644 --- a/test/unit/util/sfClassManipulatorTest.php +++ b/test/unit/util/sfClassManipulatorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(18); diff --git a/test/unit/util/sfContextTest.php b/test/unit/util/sfContextTest.php index 6946c11de..3737a0bee 100644 --- a/test/unit/util/sfContextTest.php +++ b/test/unit/util/sfContextTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(29); @@ -33,7 +33,7 @@ class frontendConfiguration extends sfApplicationConfiguration */ // use functional project configruration -require_once realpath(dirname(__FILE__).'/../../functional/fixtures/config/ProjectConfiguration.class.php'); +require_once realpath(__DIR__.'/../../functional/fixtures/config/ProjectConfiguration.class.php'); $frontend_context = sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration('frontend', 'test', true)); $frontend_context_prod = sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false)); diff --git a/test/unit/util/sfDomCssSelectorTest.php b/test/unit/util/sfDomCssSelectorTest.php index 83e77fce2..c742c7f38 100644 --- a/test/unit/util/sfDomCssSelectorTest.php +++ b/test/unit/util/sfDomCssSelectorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(72); diff --git a/test/unit/util/sfFinderTest.php b/test/unit/util/sfFinderTest.php index 8659210fd..22e247ed7 100644 --- a/test/unit/util/sfFinderTest.php +++ b/test/unit/util/sfFinderTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class my_lime_test extends lime_test { @@ -24,7 +24,7 @@ public function arrays_are_equal($a, $b, $message) require_once($_test_dir.'/../lib/util/sfFinder.class.php'); -$fixtureDir = dirname(__FILE__).'/fixtures/finder'; +$fixtureDir = __DIR__.'/fixtures/finder'; $phpFiles = array( 'dir1/dir2/file21.php', 'dir1/file12.php', diff --git a/test/unit/util/sfInflectorTest.php b/test/unit/util/sfInflectorTest.php index b0faa6425..fb6e01baa 100644 --- a/test/unit/util/sfInflectorTest.php +++ b/test/unit/util/sfInflectorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/../lib/util/sfToolkit.class.php'); require_once($_test_dir.'/../lib/util/sfInflector.class.php'); diff --git a/test/unit/util/sfNamespacedParameterHolderTest.php b/test/unit/util/sfNamespacedParameterHolderTest.php index 23c2b4bda..6df398bd2 100644 --- a/test/unit/util/sfNamespacedParameterHolderTest.php +++ b/test/unit/util/sfNamespacedParameterHolderTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(50); diff --git a/test/unit/util/sfParameterHolderTest.php b/test/unit/util/sfParameterHolderTest.php index 2b7aa71e0..1165cea3a 100644 --- a/test/unit/util/sfParameterHolderTest.php +++ b/test/unit/util/sfParameterHolderTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(24); diff --git a/test/unit/util/sfToolkitTest.php b/test/unit/util/sfToolkitTest.php index 3556459fa..e62d30a2c 100644 --- a/test/unit/util/sfToolkitTest.php +++ b/test/unit/util/sfToolkitTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(95); @@ -225,27 +225,27 @@ // ::addIncludePath() $t->diag('::addIncludePath()'); $path = get_include_path(); -$t->is(sfToolkit::addIncludePath(dirname(__FILE__)), $path, '::addIncludePath() returns the previous include_path'); -$t->is(get_include_path(), dirname(__FILE__).PATH_SEPARATOR.$path, '::addIncludePath() adds a path to the front of include_path'); +$t->is(sfToolkit::addIncludePath(__DIR__), $path, '::addIncludePath() returns the previous include_path'); +$t->is(get_include_path(), __DIR__.PATH_SEPARATOR.$path, '::addIncludePath() adds a path to the front of include_path'); -sfToolkit::addIncludePath(dirname(__FILE__), 'back'); -$t->is(get_include_path(), $path.PATH_SEPARATOR.dirname(__FILE__), '::addIncludePath() moves a path to the end of include_path'); +sfToolkit::addIncludePath(__DIR__, 'back'); +$t->is(get_include_path(), $path.PATH_SEPARATOR.__DIR__, '::addIncludePath() moves a path to the end of include_path'); sfToolkit::addIncludePath(array( - dirname(__FILE__), - dirname(__FILE__).'/..', + __DIR__, + __DIR__.'/..', )); -$t->is(get_include_path(), dirname(__FILE__).PATH_SEPARATOR.dirname(__FILE__).'/..'.PATH_SEPARATOR.$path, '::addIncludePath() adds multiple paths the the front of include_path'); +$t->is(get_include_path(), __DIR__.PATH_SEPARATOR.__DIR__.'/..'.PATH_SEPARATOR.$path, '::addIncludePath() adds multiple paths the the front of include_path'); sfToolkit::addIncludePath(array( - dirname(__FILE__), - dirname(__FILE__).'/..', + __DIR__, + __DIR__.'/..', ), 'back'); -$t->is(get_include_path(), $path.PATH_SEPARATOR.dirname(__FILE__).PATH_SEPARATOR.dirname(__FILE__).'/..', '::addIncludePath() adds multiple paths the the back of include_path'); +$t->is(get_include_path(), $path.PATH_SEPARATOR.__DIR__.PATH_SEPARATOR.__DIR__.'/..', '::addIncludePath() adds multiple paths the the back of include_path'); try { - sfToolkit::addIncludePath(dirname(__FILE__), 'foobar'); + sfToolkit::addIncludePath(__DIR__, 'foobar'); $t->fail('::addIncludePath() throws an exception if position is not valid'); } catch (Exception $e) diff --git a/test/unit/validator/i18n/sfValidatorI18nChoiceCountryTest.php b/test/unit/validator/i18n/sfValidatorI18nChoiceCountryTest.php index 658e9ad4a..8bcd2a3cd 100644 --- a/test/unit/validator/i18n/sfValidatorI18nChoiceCountryTest.php +++ b/test/unit/validator/i18n/sfValidatorI18nChoiceCountryTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(3); diff --git a/test/unit/validator/i18n/sfValidatorI18nChoiceLanguageTest.php b/test/unit/validator/i18n/sfValidatorI18nChoiceLanguageTest.php index 792ca9a83..33081578b 100644 --- a/test/unit/validator/i18n/sfValidatorI18nChoiceLanguageTest.php +++ b/test/unit/validator/i18n/sfValidatorI18nChoiceLanguageTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(3); diff --git a/test/unit/validator/i18n/sfValidatorI18nChoiceTimezoneTest.php b/test/unit/validator/i18n/sfValidatorI18nChoiceTimezoneTest.php index 244405bc6..8e4e954c3 100644 --- a/test/unit/validator/i18n/sfValidatorI18nChoiceTimezoneTest.php +++ b/test/unit/validator/i18n/sfValidatorI18nChoiceTimezoneTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/validator/sfValidatorAndTest.php b/test/unit/validator/sfValidatorAndTest.php index c06259797..cc373b737 100644 --- a/test/unit/validator/sfValidatorAndTest.php +++ b/test/unit/validator/sfValidatorAndTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(25); diff --git a/test/unit/validator/sfValidatorBaseTest.php b/test/unit/validator/sfValidatorBaseTest.php index af1122755..d71c3fdbf 100644 --- a/test/unit/validator/sfValidatorBaseTest.php +++ b/test/unit/validator/sfValidatorBaseTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(47); diff --git a/test/unit/validator/sfValidatorBooleanTest.php b/test/unit/validator/sfValidatorBooleanTest.php index aee0eae90..944455bf9 100644 --- a/test/unit/validator/sfValidatorBooleanTest.php +++ b/test/unit/validator/sfValidatorBooleanTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(17); diff --git a/test/unit/validator/sfValidatorCSRFTokenTest.php b/test/unit/validator/sfValidatorCSRFTokenTest.php index 885cb66ac..23daba8ba 100644 --- a/test/unit/validator/sfValidatorCSRFTokenTest.php +++ b/test/unit/validator/sfValidatorCSRFTokenTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(5); diff --git a/test/unit/validator/sfValidatorCallbackTest.php b/test/unit/validator/sfValidatorCallbackTest.php index 130d84395..a0b0597d2 100644 --- a/test/unit/validator/sfValidatorCallbackTest.php +++ b/test/unit/validator/sfValidatorCallbackTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/validator/sfValidatorChoiceTest.php b/test/unit/validator/sfValidatorChoiceTest.php index a24ee48f5..bb5241852 100644 --- a/test/unit/validator/sfValidatorChoiceTest.php +++ b/test/unit/validator/sfValidatorChoiceTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(14); diff --git a/test/unit/validator/sfValidatorDateRangeTest.php b/test/unit/validator/sfValidatorDateRangeTest.php index 717bb7bc1..4db90baa2 100644 --- a/test/unit/validator/sfValidatorDateRangeTest.php +++ b/test/unit/validator/sfValidatorDateRangeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/validator/sfValidatorDateTest.php b/test/unit/validator/sfValidatorDateTest.php index 3f2239025..e695bb792 100644 --- a/test/unit/validator/sfValidatorDateTest.php +++ b/test/unit/validator/sfValidatorDateTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(52); diff --git a/test/unit/validator/sfValidatorDateTimeTest.php b/test/unit/validator/sfValidatorDateTimeTest.php index 471cc1edc..77a29df53 100644 --- a/test/unit/validator/sfValidatorDateTimeTest.php +++ b/test/unit/validator/sfValidatorDateTimeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(4); diff --git a/test/unit/validator/sfValidatorDecoratorTest.php b/test/unit/validator/sfValidatorDecoratorTest.php index 1fdc3510f..b42669f0f 100644 --- a/test/unit/validator/sfValidatorDecoratorTest.php +++ b/test/unit/validator/sfValidatorDecoratorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(20); diff --git a/test/unit/validator/sfValidatorEmailTest.php b/test/unit/validator/sfValidatorEmailTest.php index 11058149b..dbfe50e9c 100644 --- a/test/unit/validator/sfValidatorEmailTest.php +++ b/test/unit/validator/sfValidatorEmailTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(11); diff --git a/test/unit/validator/sfValidatorEqualTest.php b/test/unit/validator/sfValidatorEqualTest.php index 60ae39d8c..9dbe1cc82 100644 --- a/test/unit/validator/sfValidatorEqualTest.php +++ b/test/unit/validator/sfValidatorEqualTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(9); diff --git a/test/unit/validator/sfValidatorErrorSchemaTest.php b/test/unit/validator/sfValidatorErrorSchemaTest.php index 7cf24ad70..e7768a9a6 100644 --- a/test/unit/validator/sfValidatorErrorSchemaTest.php +++ b/test/unit/validator/sfValidatorErrorSchemaTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(33); diff --git a/test/unit/validator/sfValidatorErrorTest.php b/test/unit/validator/sfValidatorErrorTest.php index 35f8e3b9d..41b03f4c3 100644 --- a/test/unit/validator/sfValidatorErrorTest.php +++ b/test/unit/validator/sfValidatorErrorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(14); diff --git a/test/unit/validator/sfValidatorFileTest.php b/test/unit/validator/sfValidatorFileTest.php index 4fae775f4..407f0e316 100755 --- a/test/unit/validator/sfValidatorFileTest.php +++ b/test/unit/validator/sfValidatorFileTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(69); diff --git a/test/unit/validator/sfValidatorFromDescriptionTest.php b/test/unit/validator/sfValidatorFromDescriptionTest.php index 6f431779d..099b06895 100644 --- a/test/unit/validator/sfValidatorFromDescriptionTest.php +++ b/test/unit/validator/sfValidatorFromDescriptionTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(98); diff --git a/test/unit/validator/sfValidatorIntegerTest.php b/test/unit/validator/sfValidatorIntegerTest.php index f7010ca1d..fcde4a357 100644 --- a/test/unit/validator/sfValidatorIntegerTest.php +++ b/test/unit/validator/sfValidatorIntegerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(15); diff --git a/test/unit/validator/sfValidatorIpTest.php b/test/unit/validator/sfValidatorIpTest.php index 98a8f698d..689928fd0 100644 --- a/test/unit/validator/sfValidatorIpTest.php +++ b/test/unit/validator/sfValidatorIpTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $validV4Ips = array( '0.0.0.0', diff --git a/test/unit/validator/sfValidatorNumberTest.php b/test/unit/validator/sfValidatorNumberTest.php index 4cd9d567d..1882106ec 100644 --- a/test/unit/validator/sfValidatorNumberTest.php +++ b/test/unit/validator/sfValidatorNumberTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(13); diff --git a/test/unit/validator/sfValidatorOrTest.php b/test/unit/validator/sfValidatorOrTest.php index 2fcac2d24..ac4d04bc9 100644 --- a/test/unit/validator/sfValidatorOrTest.php +++ b/test/unit/validator/sfValidatorOrTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(18); diff --git a/test/unit/validator/sfValidatorPassTest.php b/test/unit/validator/sfValidatorPassTest.php index 667a60749..aa58574f3 100644 --- a/test/unit/validator/sfValidatorPassTest.php +++ b/test/unit/validator/sfValidatorPassTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/validator/sfValidatorRegexTest.php b/test/unit/validator/sfValidatorRegexTest.php index a351333c6..2b5df4bbe 100644 --- a/test/unit/validator/sfValidatorRegexTest.php +++ b/test/unit/validator/sfValidatorRegexTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); function generate_regex() { diff --git a/test/unit/validator/sfValidatorSchemaCompareTest.php b/test/unit/validator/sfValidatorSchemaCompareTest.php index 2f4c996de..c8b79d280 100644 --- a/test/unit/validator/sfValidatorSchemaCompareTest.php +++ b/test/unit/validator/sfValidatorSchemaCompareTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(114); diff --git a/test/unit/validator/sfValidatorSchemaFilterTest.php b/test/unit/validator/sfValidatorSchemaFilterTest.php index ef18f0155..26a72b902 100644 --- a/test/unit/validator/sfValidatorSchemaFilterTest.php +++ b/test/unit/validator/sfValidatorSchemaFilterTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(6); diff --git a/test/unit/validator/sfValidatorSchemaTest.php b/test/unit/validator/sfValidatorSchemaTest.php index cbf13eb4e..72e683656 100644 --- a/test/unit/validator/sfValidatorSchemaTest.php +++ b/test/unit/validator/sfValidatorSchemaTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(85); diff --git a/test/unit/validator/sfValidatorStringTest.php b/test/unit/validator/sfValidatorStringTest.php index fc40eb4b1..072ee267f 100644 --- a/test/unit/validator/sfValidatorStringTest.php +++ b/test/unit/validator/sfValidatorStringTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(12); diff --git a/test/unit/validator/sfValidatorTimeTest.php b/test/unit/validator/sfValidatorTimeTest.php index 7a952a1a4..751687f59 100644 --- a/test/unit/validator/sfValidatorTimeTest.php +++ b/test/unit/validator/sfValidatorTimeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(27); diff --git a/test/unit/validator/sfValidatorUrlTest.php b/test/unit/validator/sfValidatorUrlTest.php index bffe4e034..9d1a083b6 100644 --- a/test/unit/validator/sfValidatorUrlTest.php +++ b/test/unit/validator/sfValidatorUrlTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(15); diff --git a/test/unit/view/sfViewCacheManagerTest.php b/test/unit/view/sfViewCacheManagerTest.php index d1accaec4..4d115cc55 100644 --- a/test/unit/view/sfViewCacheManagerTest.php +++ b/test/unit/view/sfViewCacheManagerTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(41); diff --git a/test/unit/view/sfViewParameterHolderTest.php b/test/unit/view/sfViewParameterHolderTest.php index c451bc4f3..f6ffbf749 100644 --- a/test/unit/view/sfViewParameterHolderTest.php +++ b/test/unit/view/sfViewParameterHolderTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(21); diff --git a/test/unit/view/sfViewTest.php b/test/unit/view/sfViewTest.php index 07ef7a2e9..450aede22 100644 --- a/test/unit/view/sfViewTest.php +++ b/test/unit/view/sfViewTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); require_once($_test_dir.'/unit/sfContextMock.class.php'); $t = new lime_test(19); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php b/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php index c588c0b71..b0187961d 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nChoiceCountryTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(8); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php b/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php index 903266f9d..367dc3b8b 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nChoiceCurrencyTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nChoiceLanguageTest.php b/test/unit/widget/i18n/sfWidgetFormI18nChoiceLanguageTest.php index 0148ad263..c954d7c4b 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nChoiceLanguageTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nChoiceLanguageTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(6); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nChoiceTimezoneTest.php b/test/unit/widget/i18n/sfWidgetFormI18nChoiceTimezoneTest.php index 09fee3eee..99d4903ef 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nChoiceTimezoneTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nChoiceTimezoneTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(4); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nDateTest.php b/test/unit/widget/i18n/sfWidgetFormI18nDateTest.php index 99c5079a4..5efb3dc50 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nDateTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nDateTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nDateTimeTest.php b/test/unit/widget/i18n/sfWidgetFormI18nDateTimeTest.php index 0d3473706..a12d4901b 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nDateTimeTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nDateTimeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/widget/i18n/sfWidgetFormI18nTimeTest.php b/test/unit/widget/i18n/sfWidgetFormI18nTimeTest.php index ed6f8e66f..75f37bf73 100644 --- a/test/unit/widget/i18n/sfWidgetFormI18nTimeTest.php +++ b/test/unit/widget/i18n/sfWidgetFormI18nTimeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../../bootstrap/unit.php'); +require_once(__DIR__.'/../../../bootstrap/unit.php'); $t = new lime_test(4); diff --git a/test/unit/widget/sfWidgetFormChoiceTest.php b/test/unit/widget/sfWidgetFormChoiceTest.php index 12c5f29d8..eb3c90a54 100644 --- a/test/unit/widget/sfWidgetFormChoiceTest.php +++ b/test/unit/widget/sfWidgetFormChoiceTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormDateRangeTest.php b/test/unit/widget/sfWidgetFormDateRangeTest.php index adcc6d86b..a0278a817 100644 --- a/test/unit/widget/sfWidgetFormDateRangeTest.php +++ b/test/unit/widget/sfWidgetFormDateRangeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterMock extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormDateTest.php b/test/unit/widget/sfWidgetFormDateTest.php index 06d06f072..cca41669a 100644 --- a/test/unit/widget/sfWidgetFormDateTest.php +++ b/test/unit/widget/sfWidgetFormDateTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $year = date('Y'); diff --git a/test/unit/widget/sfWidgetFormDateTimeTest.php b/test/unit/widget/sfWidgetFormDateTimeTest.php index 8cbb455b0..582ec0625 100644 --- a/test/unit/widget/sfWidgetFormDateTimeTest.php +++ b/test/unit/widget/sfWidgetFormDateTimeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $year = date('Y'); diff --git a/test/unit/widget/sfWidgetFormFilterDateTest.php b/test/unit/widget/sfWidgetFormFilterDateTest.php index ff1750f3c..62a1a2f7b 100644 --- a/test/unit/widget/sfWidgetFormFilterDateTest.php +++ b/test/unit/widget/sfWidgetFormFilterDateTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormFilterInputTest.php b/test/unit/widget/sfWidgetFormFilterInputTest.php index 2842a6bbd..94a3cbab0 100644 --- a/test/unit/widget/sfWidgetFormFilterInputTest.php +++ b/test/unit/widget/sfWidgetFormFilterInputTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormInputCheckboxTest.php b/test/unit/widget/sfWidgetFormInputCheckboxTest.php index ea6dfff51..3d6f4af8f 100644 --- a/test/unit/widget/sfWidgetFormInputCheckboxTest.php +++ b/test/unit/widget/sfWidgetFormInputCheckboxTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(7); diff --git a/test/unit/widget/sfWidgetFormInputFileEditableTest.php b/test/unit/widget/sfWidgetFormInputFileEditableTest.php index b8ec612fb..0d2ea3646 100644 --- a/test/unit/widget/sfWidgetFormInputFileEditableTest.php +++ b/test/unit/widget/sfWidgetFormInputFileEditableTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormInputFileTest.php b/test/unit/widget/sfWidgetFormInputFileTest.php index b154709b8..60d994132 100644 --- a/test/unit/widget/sfWidgetFormInputFileTest.php +++ b/test/unit/widget/sfWidgetFormInputFileTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/widget/sfWidgetFormInputHiddenTest.php b/test/unit/widget/sfWidgetFormInputHiddenTest.php index adb512ac2..7bb3cfbcd 100644 --- a/test/unit/widget/sfWidgetFormInputHiddenTest.php +++ b/test/unit/widget/sfWidgetFormInputHiddenTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/widget/sfWidgetFormInputPasswordTest.php b/test/unit/widget/sfWidgetFormInputPasswordTest.php index eecb4fdb0..12755af4b 100644 --- a/test/unit/widget/sfWidgetFormInputPasswordTest.php +++ b/test/unit/widget/sfWidgetFormInputPasswordTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(3); diff --git a/test/unit/widget/sfWidgetFormInputReadTest.php b/test/unit/widget/sfWidgetFormInputReadTest.php index 9ba584ded..7a662e1a0 100644 --- a/test/unit/widget/sfWidgetFormInputReadTest.php +++ b/test/unit/widget/sfWidgetFormInputReadTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(6); diff --git a/test/unit/widget/sfWidgetFormInputTextTest.php b/test/unit/widget/sfWidgetFormInputTextTest.php index c8ef775ec..c3412a9c8 100644 --- a/test/unit/widget/sfWidgetFormInputTextTest.php +++ b/test/unit/widget/sfWidgetFormInputTextTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(5); diff --git a/test/unit/widget/sfWidgetFormSchemaDecoratorTest.php b/test/unit/widget/sfWidgetFormSchemaDecoratorTest.php index 897f1b83b..1efd9914e 100644 --- a/test/unit/widget/sfWidgetFormSchemaDecoratorTest.php +++ b/test/unit/widget/sfWidgetFormSchemaDecoratorTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(16); diff --git a/test/unit/widget/sfWidgetFormSchemaFormatterListTest.php b/test/unit/widget/sfWidgetFormSchemaFormatterListTest.php index 96035a662..7196afeaa 100644 --- a/test/unit/widget/sfWidgetFormSchemaFormatterListTest.php +++ b/test/unit/widget/sfWidgetFormSchemaFormatterListTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/widget/sfWidgetFormSchemaFormatterTableTest.php b/test/unit/widget/sfWidgetFormSchemaFormatterTableTest.php index 16d2ec17d..4e165d73e 100644 --- a/test/unit/widget/sfWidgetFormSchemaFormatterTableTest.php +++ b/test/unit/widget/sfWidgetFormSchemaFormatterTableTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(2); diff --git a/test/unit/widget/sfWidgetFormSchemaFormatterTest.php b/test/unit/widget/sfWidgetFormSchemaFormatterTest.php index 7b8b60cc6..173722d73 100644 --- a/test/unit/widget/sfWidgetFormSchemaFormatterTest.php +++ b/test/unit/widget/sfWidgetFormSchemaFormatterTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(28); diff --git a/test/unit/widget/sfWidgetFormSchemaTest.php b/test/unit/widget/sfWidgetFormSchemaTest.php index 3d953a4fa..cb1bc19f9 100644 --- a/test/unit/widget/sfWidgetFormSchemaTest.php +++ b/test/unit/widget/sfWidgetFormSchemaTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(95); diff --git a/test/unit/widget/sfWidgetFormSelectCheckboxTest.php b/test/unit/widget/sfWidgetFormSelectCheckboxTest.php index 5480cd0e0..122932427 100644 --- a/test/unit/widget/sfWidgetFormSelectCheckboxTest.php +++ b/test/unit/widget/sfWidgetFormSelectCheckboxTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormSelectManyTest.php b/test/unit/widget/sfWidgetFormSelectManyTest.php index 6be1e9744..066936830 100644 --- a/test/unit/widget/sfWidgetFormSelectManyTest.php +++ b/test/unit/widget/sfWidgetFormSelectManyTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(1); diff --git a/test/unit/widget/sfWidgetFormSelectRadioTest.php b/test/unit/widget/sfWidgetFormSelectRadioTest.php index 23243b49d..6b744f1af 100644 --- a/test/unit/widget/sfWidgetFormSelectRadioTest.php +++ b/test/unit/widget/sfWidgetFormSelectRadioTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormSelectTest.php b/test/unit/widget/sfWidgetFormSelectTest.php index 96ff68914..85d7bde7b 100644 --- a/test/unit/widget/sfWidgetFormSelectTest.php +++ b/test/unit/widget/sfWidgetFormSelectTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); class FormFormatterStub extends sfWidgetFormSchemaFormatter { diff --git a/test/unit/widget/sfWidgetFormTest.php b/test/unit/widget/sfWidgetFormTest.php index 43199ab03..cfff314e3 100644 --- a/test/unit/widget/sfWidgetFormTest.php +++ b/test/unit/widget/sfWidgetFormTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(35); diff --git a/test/unit/widget/sfWidgetFormTextareaTest.php b/test/unit/widget/sfWidgetFormTextareaTest.php index 4bda4e145..c69ab0949 100644 --- a/test/unit/widget/sfWidgetFormTextareaTest.php +++ b/test/unit/widget/sfWidgetFormTextareaTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(4); diff --git a/test/unit/widget/sfWidgetFormTimeTest.php b/test/unit/widget/sfWidgetFormTimeTest.php index 2a3460703..928a4572b 100644 --- a/test/unit/widget/sfWidgetFormTimeTest.php +++ b/test/unit/widget/sfWidgetFormTimeTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(43); diff --git a/test/unit/widget/sfWidgetTest.php b/test/unit/widget/sfWidgetTest.php index 04ffd9e00..09b8d3f1b 100644 --- a/test/unit/widget/sfWidgetTest.php +++ b/test/unit/widget/sfWidgetTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); $t = new lime_test(33); diff --git a/test/unit/yaml/sfYamlDumperTest.php b/test/unit/yaml/sfYamlDumperTest.php index deb01170c..05124c97a 100644 --- a/test/unit/yaml/sfYamlDumperTest.php +++ b/test/unit/yaml/sfYamlDumperTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); sfYaml::setSpecVersion('1.1'); @@ -17,7 +17,7 @@ $parser = new sfYamlParser(); $dumper = new sfYamlDumper(); -$path = dirname(__FILE__).'/fixtures'; +$path = __DIR__.'/fixtures'; $files = $parser->parse(file_get_contents($path.'/index.yml')); foreach ($files as $file) { diff --git a/test/unit/yaml/sfYamlInlineTest.php b/test/unit/yaml/sfYamlInlineTest.php index b28d7a212..b87ad2f6b 100644 --- a/test/unit/yaml/sfYamlInlineTest.php +++ b/test/unit/yaml/sfYamlInlineTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); sfYaml::setSpecVersion('1.1'); diff --git a/test/unit/yaml/sfYamlParserTest.php b/test/unit/yaml/sfYamlParserTest.php index d6a9d861a..7e17b2a3e 100644 --- a/test/unit/yaml/sfYamlParserTest.php +++ b/test/unit/yaml/sfYamlParserTest.php @@ -8,7 +8,7 @@ * file that was distributed with this source code. */ -require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); +require_once(__DIR__.'/../../bootstrap/unit.php'); sfYaml::setSpecVersion('1.1'); @@ -16,7 +16,7 @@ $parser = new sfYamlParser(); -$path = dirname(__FILE__).'/fixtures'; +$path = __DIR__.'/fixtures'; $files = $parser->parse(file_get_contents($path.'/index.yml')); foreach ($files as $file) {