diff options
Diffstat (limited to 'crates/shirabe/tests')
| -rw-r--r-- | crates/shirabe/tests/command/show_command_test.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/tests/common/bootstrap.rs | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/crates/shirabe/tests/command/show_command_test.rs b/crates/shirabe/tests/command/show_command_test.rs index 47eae462..20dbf848 100644 --- a/crates/shirabe/tests/command/show_command_test.rs +++ b/crates/shirabe/tests/command/show_command_test.rs @@ -8,7 +8,7 @@ use serial_test::serial; use shirabe::package::Link; use shirabe::package::handle::PackageInterfaceHandle; use shirabe::repository::PlatformRepository; -use shirabe_php_shim::PhpMixed; +use shirabe_php_shim::{PhpMixed, date_local}; /// Build a `Vec<(PhpMixed, PhpMixed)>` command input from `(key, value)` pairs. fn input(pairs: Vec<(&str, PhpMixed)>) -> Vec<(PhpMixed, PhpMixed)> { @@ -1028,7 +1028,7 @@ fn test_self_and_package_combination() { match and prints \"this week\" whenever the local date differs from the UTC date \ (e.g. daily 00:00-09:00 JST); see TODO(php-semantics) in shirabe-php-shim datetime.rs"] fn test_self() { - let today = chrono::Local::now().format("%Y-%m-%d").to_string(); + let today = date_local("Y-m-d", None); let _tear_down = init_temp_composer( Some(&serde_json::json!({ "name": "vendor/package", diff --git a/crates/shirabe/tests/common/bootstrap.rs b/crates/shirabe/tests/common/bootstrap.rs index a908bff2..9f667597 100644 --- a/crates/shirabe/tests/common/bootstrap.rs +++ b/crates/shirabe/tests/common/bootstrap.rs @@ -18,9 +18,6 @@ pub fn bootstrap() { ONCE.call_once(|| { // PHP: error_reporting(E_ALL) has no counterpart here. - // PHP: date_default_timezone_set(@date_default_timezone_get()); - shirabe_php_shim::date_default_timezone_set(&shirabe_php_shim::date_default_timezone_get()); - // PHP: require src/bootstrap.php and refresh vendor/composer/InstalledVersions.php. // TODO(php-runtime): port remaining bootstrap processes (the src/bootstrap.php include and // the InstalledVersions refresh are PHP autoload mechanics with no Rust counterpart yet). |
