public function testAssemblingWrongChain() { $foo = new RouterStaticRule('bar'); $bar = new RouterHostnameRule('mega.example.com'); $chain = $foo->chain($bar); $this->router->addRoute('foobar', $chain); $this->assertEquals(2, $chain->getCount()); try { $s = $this->router->assembly(array(), 'foobar'); } catch (BaseException $e) { $this->assertInstanceOf('RouterException', $e); return true; } $this->fail(); }