public function testSpawnView() { $module = $this->getMockBuilder('Nethgui\\Controller\\AbstractController')->setConstructorArgs(array('InnerModule'))->setMethods(array())->getMock(); $module->expects($this->once())->method('getIdentifier')->will($this->returnValue('InnerModule')); $innerView1 = $this->object->spawnView($module, TRUE); $innerView2 = $this->object->spawnView($module, 'View2'); $this->assertInstanceOf('Nethgui\\View\\ViewInterface', $innerView1); $this->assertInstanceOf('Nethgui\\View\\ViewInterface', $innerView2); $this->assertEquals($innerView1, $this->object['InnerModule']); $this->assertEquals($innerView2, $this->object['View2']); }