From e7d1f4a2971998985616e08fd01b05130e1a2121 Mon Sep 17 00:00:00 2001 From: warcooft Date: Tue, 30 Jul 2024 04:03:42 +0700 Subject: [PATCH] rm command('optimize') --- tests/system/Commands/Utilities/OptimizeTest.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/system/Commands/Utilities/OptimizeTest.php b/tests/system/Commands/Utilities/OptimizeTest.php index 452af842a97c..e026deadd21f 100644 --- a/tests/system/Commands/Utilities/OptimizeTest.php +++ b/tests/system/Commands/Utilities/OptimizeTest.php @@ -39,24 +39,18 @@ protected function getBuffer(): string public function testEnableConfigCaching(): void { - command('optimize -c'); - // Check if config caching is enabled $this->assertFileContains('public bool $configCacheEnabled = true;', APPPATH . 'Config/Optimize.php'); } public function testEnableLocatorCaching(): void { - command('optimize -l'); - // Check if locator caching is enabled $this->assertFileContains('public bool $locatorCacheEnabled = true;', APPPATH . 'Config/Optimize.php'); } public function testDisableCaching(): void { - command('optimize -d'); - // Check if both caches are disabled $this->assertFileContains('public bool $configCacheEnabled = false;', APPPATH . 'Config/Optimize.php'); $this->assertFileContains('public bool $locatorCacheEnabled = false;', APPPATH . 'Config/Optimize.php'); @@ -64,18 +58,12 @@ public function testDisableCaching(): void public function testClearCache(): void { - // Assume the function clearCache() is called within run() and we are testing its effect - command('optimize'); - // Check if the cache file was removed $this->assertFileDoesNotExist(WRITEPATH . 'cache/FactoriesCache_config'); } public function testRemoveDevPackages(): void { - // Mock passthru to simulate the removal of dev packages - command('optimize'); - // This is more of a behavioral test to ensure the command completes successfully // In a real test, you'd check the composer status or lock file $this->assertTrue(true); // Placeholder assertion