-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb31641
commit edfe940
Showing
6 changed files
with
491 additions
and
329 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
sudo: false | ||
language: php | ||
php: | ||
- 7.2 | ||
|
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 |
---|---|---|
|
@@ -18,12 +18,16 @@ Usage | |
|
||
```php | ||
<?php | ||
$deriver = new \webignition\AbsoluteUrlDeriver\AbsoluteUrlDeriver( | ||
'/server.php?param1=value1', | ||
'http://www.example.com/pathOne/pathTwo/pathThree' | ||
); | ||
use webignition\AbsoluteUrlDeriver\AbsoluteUrlDeriver; | ||
use webignition\Uri\Uri; | ||
|
||
$base = 'https://example.com'; | ||
$relative = '/path?query#fragment'; | ||
|
||
$this->assertEquals('http://www.example.com/server.php?param1=value1', $deriver->getAbsoluteUrl()); | ||
$this->assertEquals( | ||
'https://example.com/path?query#fragment', | ||
AbsoluteUrlDeriver::derive(new Uri($base), new Uri($relative)) | ||
); | ||
``` | ||
|
||
Building | ||
|
@@ -35,7 +39,7 @@ If used as a dependency by another project, update that project's composer.json | |
and update your dependencies. | ||
|
||
"require": { | ||
"webignition/absolute-url-deriver": "*" | ||
"webignition/absolute-url-deriver": ">=3,<4" | ||
} | ||
|
||
#### Developing | ||
|
@@ -46,10 +50,10 @@ This project has external dependencies managed with [composer][3]. Get and insta | |
mkdir ~/absolute-url-deriver && cd ~/absolute-url-deriver | ||
|
||
# Clone repository | ||
git clone [email protected]:webignition/absolute-url-deriver.git. | ||
git clone [email protected]:webignition/absolute-url-deriver.git . | ||
|
||
# Retrieve/update dependencies | ||
composer.phar install | ||
composer install | ||
|
||
Testing | ||
------- | ||
|
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
Oops, something went wrong.