Beispiel #1
0
 /**
  * @param string $rootResourceId
  * @param array $savedData
  * @param bool $expectedValue
  * @dataProvider isEverythingAllowedWithSavedFromDataProvider
  */
 public function testIsEverythingAllowedWithSavedFromData($rootResourceId, $savedData, $expectedValue)
 {
     $this->registry->expects($this->once())->method('registry')->with(IntegrationController::REGISTRY_KEY_CURRENT_RESOURCE)->willReturn($savedData);
     $this->rootResource->expects($this->any())->method('getId')->will($this->returnValue($rootResourceId));
     $this->webapiBlock = $this->getWebapiBlock();
     $this->assertEquals($expectedValue, $this->webapiBlock->isEverythingAllowed());
 }
 /**
  * @param string $rootResourceId
  * @param array $integrationData
  * @param array $selectedResources
  * @param bool $expectedValue
  * @dataProvider isEverythingAllowedProvider
  */
 public function testIsEverythingAllowed($rootResourceId, $integrationData, $selectedResources, $expectedValue)
 {
     $this->webapiBlock = $this->getWebapiBlock($integrationData, $selectedResources);
     $this->rootResource->expects($this->once())->method('getId')->will($this->returnValue($rootResourceId));
     $this->assertEquals($expectedValue, $this->webapiBlock->isEverythingAllowed());
 }