Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
	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());
	}