From 259dd0baa15b2dc1dd97fba8d3fde5d408fd0bc4 Mon Sep 17 00:00:00 2001 From: PJ Dietz Date: Sat, 21 Feb 2015 08:14:38 -0500 Subject: [PATCH] Remove RouteTable::addRoutes --- src/pjdietz/WellRESTed/RouteTable.php | 14 -------------- test/RouteTableTest.php | 10 +++------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/pjdietz/WellRESTed/RouteTable.php b/src/pjdietz/WellRESTed/RouteTable.php index 1fe2a99..d6e281c 100644 --- a/src/pjdietz/WellRESTed/RouteTable.php +++ b/src/pjdietz/WellRESTed/RouteTable.php @@ -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. * diff --git a/test/RouteTableTest.php b/test/RouteTableTest.php index f92e0c9..83eab7e 100644 --- a/test/RouteTableTest.php +++ b/test/RouteTableTest.php @@ -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);