public function testGetMenuDeepNestedWithoutPermission() { $this->config->shouldReceive('get')->once()->andReturn(array('Header' => array('Header2' => array('test_name')))); $itemconfig = m::mock('Frozennode\\Administrator\\Config\\Config'); $itemconfig->shouldReceive('getOption')->once()->andReturn(false); $this->configFactory->shouldReceive('make')->once()->andReturn($itemconfig); $this->assertEquals($this->menu->getMenu(), array()); }
public function testGetMenuDeepNestedWithoutPermission() { $this->config->shouldReceive('get')->once()->andReturn(array('Header' => array('Header2' => array('test_name')))); $this->configFactory->shouldReceive('make')->once()->andReturn(m::mock(array('getOption' => false))); $this->assertEquals($this->menu->getMenu(), array()); }