not->toBe($hash2) ->and($hash1)->not->toBe($hash3) ->and($hash2)->not->toBe($hash3); }); it('custom_network_aliases is in the configuration hash fields', function () { // This test verifies the field is in the isConfigurationChanged method by reading the source $reflection = new ReflectionClass(Application::class); $method = $reflection->getMethod('isConfigurationChanged'); $source = file_get_contents($method->getFileName()); // Extract the method source $lines = explode("\n", $source); $methodStartLine = $method->getStartLine() - 1; $methodEndLine = $method->getEndLine(); $methodSource = implode("\n", array_slice($lines, $methodStartLine, $methodEndLine - $methodStartLine)); // Verify custom_network_aliases is in the hash calculation expect($methodSource)->toContain('$this->custom_network_aliases') ->and($methodSource)->toContain('ports_mappings'); });