Remove RouteTable::addRoutes
This commit is contained in:
parent
1c82908eeb
commit
259dd0baa1
|
|
@ -122,20 +122,6 @@ class RouteTable implements HandlerInterface
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a series of routes.
|
||||
*
|
||||
* @param HandlerInterface[] $routes List array of HandlerInterface instances
|
||||
*/
|
||||
public function addRoutes(array $routes)
|
||||
{
|
||||
foreach ($routes as $route) {
|
||||
if ($route instanceof HandlerInterface) {
|
||||
$this->addRoute($route);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a new route.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -151,13 +151,9 @@ class RouteTableTest extends \PHPUnit_Framework_TestCase
|
|||
$this->request->getPath()->willReturn("/");
|
||||
|
||||
$table = new RouteTable();
|
||||
$table->addRoutes(
|
||||
[
|
||||
$route1->reveal(),
|
||||
$route2->reveal(),
|
||||
$route3->reveal()
|
||||
]
|
||||
);
|
||||
$table->addRoute($route1->reveal());
|
||||
$table->addRoute($route2->reveal());
|
||||
$table->addRoute($route3->reveal());
|
||||
$response = $table->getResponse($this->request->reveal());
|
||||
|
||||
$this->assertNotNull($response);
|
||||
|
|
|
|||
Loading…
Reference in New Issue