aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/downloader/file_downloader_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-20 06:28:13 +0900
committernsfisis <nsfisis@gmail.com>2026-07-20 06:28:13 +0900
commit8b9368a3d2c8cb5b73edc794b77ebd2460d24b06 (patch)
tree6ec4e7342ece017030da5639064343a1b9677ace /crates/shirabe/tests/downloader/file_downloader_test.rs
parent8766b9dbc981c827d49658b7bc79d860031c0493 (diff)
downloadphp-shirabe-8b9368a3d2c8cb5b73edc794b77ebd2460d24b06.tar.gz
php-shirabe-8b9368a3d2c8cb5b73edc794b77ebd2460d24b06.tar.zst
php-shirabe-8b9368a3d2c8cb5b73edc794b77ebd2460d24b06.zip
fix(config): restore PHP (int) cast for ttl and timeout values
PHP's Config::get() applies an (int) cast to cache-files-ttl, cache-ttl, and the process-timeout env override (Config.php:326,367,398), so string values like '99999999' become integers. The strict PhpMixed::as_int returned None for strings, collapsing them to 0. Use the intval shim, which implements the PHP cast, and un-ignore test_cache_garbage_collection_is_called which this had blocked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/downloader/file_downloader_test.rs')
-rw-r--r--crates/shirabe/tests/downloader/file_downloader_test.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/crates/shirabe/tests/downloader/file_downloader_test.rs b/crates/shirabe/tests/downloader/file_downloader_test.rs
index 451b792e..623ac34c 100644
--- a/crates/shirabe/tests/downloader/file_downloader_test.rs
+++ b/crates/shirabe/tests/downloader/file_downloader_test.rs
@@ -196,7 +196,6 @@ fn test_download_with_custom_cache_key() {
#[test]
#[serial]
-#[ignore = "PHP Config::get('cache-files-ttl') casts the string via (int) (Config.php:396-398), turning '99999999' into 99999999, but shirabe's PhpMixed::as_int returns None for String so Config::get yields 0 and the assertion fails. Faithful port stays failing until the src is fixed."]
fn test_cache_garbage_collection_is_called() {
let expected_ttl: i64 = 99999999;