German Fake Phone Numbers for Dial Code Tests
Use a fictional Germany phone fixture for QA. Compare the original display value with international notation and test phone validation.
Test fixture
Input: 030 23125 142
International: +493023125142Phone format
This Berlin fixture uses a number from the Bundesnetzagentur list for media productions. The domestic form starts with 030 for Berlin. With the country calling code +49, the initial trunk zero is removed. Store the region independently and keep the number in a string field.
Germany has area codes and subscriber numbers of varying lengths. Avoid using the length of this example as a universal rule. In form tests, keep a separate valid-format sample for a different region and use a country-aware phone library to check the accepted number types.
Form and import tests
Test a contact view that displays a geographic number and a profile form that explicitly wants a mobile number. The Berlin fixture is a landline. An app that offers SMS verification should handle that difference in its product rules. In a fixture, use the sandbox to simulate the branch while preventing a real send.
During an import, try a number with spaces and another with the separators removed. Compare the resulting internal representation. Include a record with an extension beside the number. Test persistence and printing of the extension without allowing it to become part of the dial string stored on the main contact field.
Fixture assertions
Change the selected country with this value already present and check that the error points to the appropriate field. If the interface accepts both domestic and international input for a selected country, add paired cases and assert that saving the local form followed by editing the record does not corrupt its prefix.
The snippet normalizes the known domestic fixture to its international representation. It assumes input has already been selected from this fixture. Use separate tests for whitespace trimming, input in another national format and mistyped prefixes. Keep the local normalization case independent of the stubbed telephony integration.
A test for international paste should preserve the plus sign when the field loses focus. Verify the resulting request before the app applies any custom number formatting.
JavaScript test example
const raw = "030 23125 142";
const normalized = raw.replace(/ /g, "").replace(/^0/, "+49");
if (normalized !== "+493023125142") {
throw new Error("Unexpected normalized phone fixture");
}