toContain("if (CACTI_CSRF_SECRET != '')") ->and($installer)->toContain('catch (Throwable $e)') ->and($installer)->toContain('if ($completed) {') ->and($installer)->toContain("set_install_config_option('install_step', Installer::STEP_ERROR)"); }); test('installer isolates admin email changes and fails on package import errors', function () use ($root) { $installer = file_get_contents($root . '/lib/installer.php'); expect($installer)->toContain("db_execute_prepared('UPDATE user_auth") ->and($installer)->toContain("WHERE username = \\'admin\\'") ->and($installer)->toContain("\$failure = __('One or more template packages failed to import')") ->and($installer)->toContain('return $failure;'); });