/**
  * @test
  * @expectedException \InvalidArgumentException
  * @expectedExceptionCode 1425236663
  */
 public function moduleDispatcherIsCalled()
 {
     $GLOBALS['TBE_MODULES'] = array('_PATHS' => array('module_fixture' => __DIR__ . '/../Fixtures/ModuleFixture/'));
     $this->requestMock->expects($this->any())->method('getQueryParams')->will($this->returnValue(array('M' => 'module_fixture')));
     $this->formProtectionMock->expects($this->once())->method('validateToken')->will($this->returnValue(true));
     $this->subject->expects($this->once())->method('boot');
     $this->subject->expects($this->atLeastOnce())->method('getFormProtection')->will($this->returnValue($this->formProtectionMock));
     $this->subject->handleRequest($this->requestMock);
 }
 /**
  * @test
  * @expectedException \InvalidArgumentException
  * @expectedExceptionCode 1425236663
  */
 public function moduleDispatcherIsCalled()
 {
     $GLOBALS['TBE_MODULES'] = array('_PATHS' => array('_dispatcher' => array(), 'module_fixture' => __DIR__ . '/Fixtures/ModuleFixture/'));
     $_GET['M'] = 'module_fixture';
     $this->formProtectionMock->expects($this->once())->method('validateToken')->will($this->returnValue(TRUE));
     $this->subject->expects($this->once())->method('boot');
     $this->subject->expects($this->once())->method('getFormProtection')->will($this->returnValue($this->formProtectionMock));
     $this->subject->handleRequest();
 }