Skip to content

Commit

Permalink
#2: Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Bastien committed Jul 10, 2016
1 parent 09856db commit bc50368
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/Unit/LoadBalancerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class LoadBalancerTest extends \PHPUnit_Framework_TestCase
/**
* @test LoadBalancer::handleRequest()
*/
public function testHandleRequestNoHostException()
public function testHandleRequestNoRegisteredHostException()
{
$chooser = $this->prophesize('NBN\LoadBalancer\Chooser\ChooserInterface');
$resquest = $this->prophesize('Symfony\Component\HttpFoundation\Request');
$request = $this->prophesize('Symfony\Component\HttpFoundation\Request');

$loadBalancer = new LoadBalancer([], $chooser->reveal());

$this->expectException(NoRegisteredHostException::class);
$loadBalancer->handleRequest($resquest->reveal());
$loadBalancer->handleRequest($request->reveal());
}

/**
Expand All @@ -34,12 +34,12 @@ public function testHandleRequestNoAvailableException()
{
$chooser = $this->prophesize('NBN\LoadBalancer\Chooser\ChooserInterface');
$host = $this->prophesize('NBN\LoadBalancer\Host\HostInterface');
$resquest = $this->prophesize('Symfony\Component\HttpFoundation\Request');
$request = $this->prophesize('Symfony\Component\HttpFoundation\Request');

$loadBalancer = new LoadBalancer([$host], $chooser->reveal());

$this->expectException(NoAvailableHostException::class);
$loadBalancer->handleRequest($resquest->reveal());
$loadBalancer->handleRequest($request->reveal());
}

/**
Expand All @@ -48,13 +48,13 @@ public function testHandleRequestNoAvailableException()
public function testHandleRequestHostRequestException()
{
$host = $this->prophesize('NBN\LoadBalancer\Host\HostInterface')->reveal();
$resquest = $this->prophesize('Symfony\Component\HttpFoundation\Request');
$request = $this->prophesize('Symfony\Component\HttpFoundation\Request');
$chooser = $this->prophesize('NBN\LoadBalancer\Chooser\ChooserInterface');
$chooser->getAvailableHost($resquest, [$host])->willReturn($host);
$chooser->getAvailableHost($request, [$host])->willReturn($host);

$loadBalancer = new LoadBalancer([$host], $chooser->reveal());

$this->expectException(HostRequestException::class);
$loadBalancer->handleRequest($resquest->reveal());
$loadBalancer->handleRequest($request->reveal());
}
}

0 comments on commit bc50368

Please sign in to comment.