function testGetId() { $u = new URL('/hello/id:abc/'); $this->assertEmpty($u->getId(), 'ID проверяется на is_numeric'); $u = new URL('/hello/id:-123/'); $this->assertEmpty($u->getId(), 'ID должен быть больше нуля'); $u = new URL('/hello/id:123/'); $this->assertEquals(123, $u->getId(), 'Корректный ID'); }