Esempio n. 1
0
 public function testClear()
 {
     $this->list->insert('foo', new TestAsset\DummyRoute(), 0);
     $this->list->insert('bar', new TestAsset\DummyRoute(), 0);
     $this->assertEquals(2, count($this->list));
     $this->list->clear();
     $this->assertEquals(0, count($this->list));
     $this->assertSame(false, $this->list->current());
 }
Esempio n. 2
0
 /**
  * setRoutes(): defined by RouteStackInterface interface.
  *
  * @param  array|\Traversable $routes
  * @return SimpleRouteStack
  */
 public function setRoutes($routes)
 {
     $this->routes->clear();
     $this->addRoutes($routes);
     return $this;
 }