&1', $output, $exitCode); unlink($tmp); expect($exitCode)->toBe(0, implode("\n", $output)); })->with($membershipViews); it('kennt jeden verwendeten Sprachschlüssel in allen Sprachen', function (string $view) { preg_match_all( "/__\('(membership|reminder)\.([a-zA-Z0-9_]+)'/", file_get_contents(base_path($view)), $matches, PREG_SET_ORDER ); expect($matches)->not->toBeEmpty(); foreach (['de', 'en', 'es', 'fr'] as $locale) { foreach ($matches as [$_, $file, $key]) { $translations = include base_path("resources/lang/$locale/$file.php"); expect(array_key_exists($key, $translations)) ->toBeTrue("$locale/$file.php fehlt '$key' (aus $view)"); } } })->with(array_diff($membershipViews, ['resources/views/dashboard/_membership.blade.php'])); it('beschreibt nirgends mehr die abgeschaffte automatische Vertragsverlängerung', function (string $locale) { $membership = include base_path("resources/lang/$locale/membership.php"); foreach (['info_contract_renewal', 'membership_was_renewed', 'contract_renewal', 'change_copy_1', 'change_copy_2'] as $obsolete) { expect($membership)->not->toHaveKey($obsolete); } expect($membership)->toHaveKeys(['renewal_hl', 'renewal_info', 'renewal_expired_info', 'renewal_consequence', 'active_info', 'renewal_possible_from']); })->with(['de', 'en', 'es', 'fr']);