setAccessible(true); return $rM->invoke(null); } protected function setUp(): void { if (defined('HOST')) { $this->markTestSkipped('HOST constant already defined; $_SERVER path not reachable'); } } public function testHostNameYieldsDottedDomain(): void { $_SERVER['HTTP_HOST'] = 'cdn.example.com'; $this->assertSame('.cdn.example.com', $this->domain()); } public function testBareIpYieldsNull(): void { $_SERVER['HTTP_HOST'] = '203.0.113.9'; $this->assertNull($this->domain()); } public function testEmptyHostYieldsNull(): void { $_SERVER['HTTP_HOST'] = ''; $this->assertNull($this->domain()); } }