diff options
author | Michal Čihař <michal@cihar.com> | 2017-07-12 18:22:48 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-07-12 18:22:48 +0300 |
commit | 6521f7de392eb8415415a26ac0232a6c6778d040 (patch) | |
tree | 230a19e74c242cf85a5237d6e1f154c162dd8425 /test/bootstrap-dist.php | |
parent | 77d035240eae68f31d1f4e8ad5ba813ebdcc7210 (diff) |
Add wrapper around PHP date function to ease testing
This way Tracker tests run on PHP 7 as well.
Issue #13484
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'test/bootstrap-dist.php')
-rw-r--r-- | test/bootstrap-dist.php | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/test/bootstrap-dist.php b/test/bootstrap-dist.php index 5284fa8be2..9f9f4b93ca 100644 --- a/test/bootstrap-dist.php +++ b/test/bootstrap-dist.php @@ -95,45 +95,3 @@ $GLOBALS['cell_align_left'] = 'left'; // Check whether we have runkit extension define('PMA_HAS_RUNKIT', function_exists('runkit_constant_redefine')); $GLOBALS['runkit_internal_override'] = ini_get('runkit.internal_override'); - - -/** - * Function to emulate date() function - * - * @param string $date_format arg - * - * @return string dummy date - */ -function test_date($date_format) -{ - return '0000-00-00 00:00:00'; -} - -/** - * Overrides date function - * - * @return boolean whether function was overridden or not - */ -function setupForTestsUsingDate() -{ - if (PMA_HAS_RUNKIT && $GLOBALS['runkit_internal_override']) { - runkit_function_rename('date', 'test_date_override'); - runkit_function_rename('test_date', 'date'); - return true; - } else { - return false; - } -} - -/** - * Restores date function - * - * @return void - */ -function tearDownForTestsUsingDate() -{ - if (PMA_HAS_RUNKIT && $GLOBALS['runkit_internal_override']) { - runkit_function_rename('date', 'test_date'); - runkit_function_rename('test_date_override', 'date'); - } -} |