@@ -58,67 +58,5 @@ public function test_it_accepts_frankenphp_worker_overrides_as_equivalent(): voi
5858
5959 $ this ->assertTrue (CaddyPhpIni::directiveMatches ('max_execution_time ' , '90 ' , '0 ' ));
6060 $ this ->assertTrue (CaddyPhpIni::directiveMatches ('max_input_time ' , '90 ' , '-1 ' ));
61- $ this ->assertTrue ($ verification [0 ]['matches ' ]);
62- }
63-
64- public function test_it_accepts_frankenphp_worker_overrides_as_equivalent (): void
65- {
66- Config::set ('octane.caddy.env ' , [
67- 'OCTANE_MAX_EXECUTION_TIME ' => 90 ,
68- 'OCTANE_MAX_INPUT_TIME ' => 90 ,
69- ]);
70-
71- $ this ->assertTrue (CaddyPhpIni::directiveMatches ('max_execution_time ' , '90 ' , '0 ' ));
72- $ this ->assertTrue (CaddyPhpIni::directiveMatches ('max_input_time ' , '90 ' , '-1 ' ));
73- $ this ->assertTrue (CaddyPhpIni::directiveMatches ('xdebug.mode ' , 'off ' , '' ));
74- }
75- }
76-
77- class CliPhpIniTest extends TestCase
78- {
79- public function test_it_builds_versus_rows_between_cli_and_worker (): void
80- {
81- Config::set ('octane.caddy.env ' , [
82- 'OCTANE_MEMORY_LIMIT ' => '2000M ' ,
83- 'OCTANE_MAX_EXECUTION_TIME ' => 90 ,
84- 'OCTANE_MAX_INPUT_TIME ' => 90 ,
85- ]);
86-
87- $ rows = CliPhpIni::versusRows (
88- [
89- 'memory_limit ' => '-1 ' ,
90- 'max_execution_time ' => '0 ' ,
91- 'max_input_time ' => '-1 ' ,
92- 'xdebug.mode ' => 'debug,develop ' ,
93- ],
94- [
95- 'memory_limit ' => '2000M ' ,
96- 'max_execution_time ' => '0 ' ,
97- 'max_input_time ' => '-1 ' ,
98- 'xdebug.mode ' => '' ,
99- ],
100- CaddyPhpIni::configured (),
101- );
102-
103- $ memory = collect ($ rows )->firstWhere ('directive ' , 'memory_limit ' );
104- $ execution = collect ($ rows )->firstWhere ('directive ' , 'max_execution_time ' );
105-
106- $ this ->assertTrue ($ memory ['cli_differs_from_worker ' ]);
107- $ this ->assertTrue ($ execution ['worker_matches_configured ' ]);
108- $ this ->assertFalse ($ execution ['cli_differs_from_worker ' ]);
109- }
110-
111- public function test_it_builds_extension_rows (): void
112- {
113- $ rows = CliPhpIni::extensionRows (
114- ['rdkafka ' => true , 'mongodb ' => false ],
115- ['rdkafka ' => false , 'mongodb ' => false ],
116- );
117-
118- $ rdkafka = collect ($ rows )->firstWhere ('extension ' , 'rdkafka ' );
119-
120- $ this ->assertTrue ($ rdkafka ['differs ' ]);
121- $ this ->assertSame ('yes ' , $ rdkafka ['cli ' ]);
122- $ this ->assertSame ('no ' , $ rdkafka ['worker ' ]);
12361 }
12462}
0 commit comments