Skip to content

Commit

Permalink
a simple test so ensure everything is at least "stable"
Browse files Browse the repository at this point in the history
  • Loading branch information
fideloper committed Nov 20, 2014
1 parent b0776f1 commit 337d8e7
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions tests/ProxyServiceProviderTest.php
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.

Copy link
@GrahamCampbell

GrahamCampbell Nov 20, 2014

Contributor

Files should end in a single new line character.

This comment has been minimized.

Copy link
@fideloper

fideloper via email Nov 20, 2014

Author Owner

This comment has been minimized.

Copy link
@GrahamCampbell

GrahamCampbell Nov 20, 2014

Contributor

PSR-2. I assume the reason is to make things easy for people using command line editors.

This comment has been minimized.

Copy link
@fideloper

fideloper via email Nov 20, 2014

Author Owner

0 comments on commit 337d8e7

Please sign in to comment.