-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hasQueryParameterWithKey($key) method.
- Loading branch information
Martin Brecht-Precht
committed
Dec 19, 2016
1 parent
2ce8fdc
commit 1d4aceb
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,13 @@ public function testInvalidArgument15() | |
$url->setFragment(array()); | ||
} | ||
|
||
public function testInvalidArgument16() | ||
{ | ||
$this->setExpectedException(get_class(new \InvalidArgumentException())); | ||
$url = new Url('https://john:[email protected]:8443/path/to/resource'); | ||
$url->hasQueryParameterWithKey(array()); | ||
} | ||
|
||
public function testParser() | ||
{ | ||
$url = new Url('https://john:[email protected]:8443/path/to/resource'); | ||
|
@@ -108,6 +115,7 @@ public function testParser() | |
$this->assertTrue($url->hasScheme()); | ||
$this->assertTrue($url->hasHostname()); | ||
$this->assertTrue($url->hasPath()); | ||
$this->assertTrue($url->hasQueryParameterWithKey('arg1')); | ||
|
||
$this->assertEquals(2, $url->countQueryParameters()); | ||
|
||
|