3 final class AlmanacNamesTestCase
extends PhabricatorTestCase
{
5 public function testServiceOrDeviceNames() {
33 'db.companyname.instance' => true,
34 'web002.useast.example.com' => true,
35 'master.example-corp.com' => true,
37 // Maximum length is 100.
38 str_repeat('a', 100) => true,
39 str_repeat('a', 101) => false,
42 foreach ($map as $input => $expect) {
45 AlmanacNames
::validateName($input);
46 } catch (Exception
$ex) {
51 !($caught instanceof Exception
),