/** * Tests the setComponentRouter() method * * @return void * * @since 3.4 */ public function testSetComponentRouter() { // Check if a router that implements JComponentRouterInterface gets accepted $router = new TestRouter(); $this->assertEquals($this->object->setComponentRouter('com_test', $router), true); $this->assertSame($this->object->getComponentRouter('com_test'), $router); // Check if a false router is correctly rejected $this->assertFalse($this->object->setComponentRouter('com_test3', new stdClass())); }