-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a simple test so ensure everything is at least "stable"
- Loading branch information
Showing
1 changed file
with
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
class ProxyServiceProviderTest extends PHPUnit_Framework_TestCase { | ||
|
||
public function test_trusted_proxy_can_be_created_and_configured() | ||
{ | ||
$config = array( | ||
'proxy' => array( | ||
'proxies' => '*', | ||
), | ||
); | ||
|
||
$request = new RequestStub; | ||
|
||
$sp = new Fideloper\Proxy\ProxyServiceProvider(array( | ||
'config' => $config, | ||
'request' => $reqyuest, | ||
)); | ||
|
||
// I'd love to do this, but there are too many dependencies here | ||
//$sp->boot(); | ||
|
||
$this->assertInstanceOf('Fideloper\Proxy\ProxyServiceProvider', $sp); | ||
} | ||
} | ||
|
||
class RequestStub { | ||
|
||
public function getClientIps() | ||
{ | ||
return array('192.168.33.10', '10.0.1.10'); | ||
} | ||
|
||
public function setTrustedProxies(array $cidrIps) | ||
{ | ||
// slurp | ||
} | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fideloper
via email
Author
Owner
|
Files should end in a single new line character.