phone-number: made more idiomatic

also improve the test file.