public function testSetCondition() { $collection = new RouteCollection(); $routea = new Route('/a'); $routeb = new Route('/b', array(), array(), array(), '{locale}.example.net', array(), array(), 'context.getMethod() == "GET"'); $collection->add('a', $routea); $collection->add('b', $routeb); $collection->setCondition('context.getMethod() == "POST"'); $this->assertEquals('context.getMethod() == "POST"', $routea->getCondition()); $this->assertEquals('context.getMethod() == "POST"', $routeb->getCondition()); }