/** * @test * @depends URI\GenerateTest::Reset */ public function Query_Exists() { // Test both when there is and isn't pre-existing data $uri1 = new \uri('example.com'); $uri2 = new \uri('https://*****:*****@example.com:777/path/to/script.php?query=str#fragment'); $uri3 = new \uri('google.com?empty'); // Check For Errors $this->assertEmpty($uri1->error); $this->assertEmpty($uri2->error); $this->assertEmpty($uri3->error); $this->assertFalse($uri1->query_exists('a')); $this->assertTrue($uri2->query_exists('query')); $this->assertTrue($uri3->query_exists('empty')); }