/** * setup validation test */ protected function setupValidationTest() { $this->filePath = dirname(realpath(__DIR__)) . '/_files/'; $this->formConfigSource = (include $this->filePath . 'form_config_entity.php'); $this->formConfig->expects($this->any())->method('getConfig')->willReturn($this->formConfigSource['config']['form']['umc_entity']); $this->restrictionConfigSource = (include $this->filePath . 'restriction.php'); $this->restrictionConfig->expects($this->any())->method('getRestrictions')->willReturn($this->restrictionConfigSource['config']['entity']['umc_entity']['restriction']); }
/** * setup validation test */ protected function setupValidationTest() { $this->filePath = dirname(realpath(__DIR__)) . '/_files/'; $this->formConfigSource = (include $this->filePath . 'form_config.php'); $this->formConfig->expects($this->any())->method('getConfig')->willReturn($this->formConfigSource['config']['form']['umc_module']); $this->restrictionConfigSource = (include $this->filePath . 'restriction.php'); $this->restrictionConfig->expects($this->any())->method('getRestrictions')->willReturn($this->restrictionConfigSource['config']['entity']['umc_module']['restriction']); /** @var \Umc\Base\Model\Core\Settings | object $settings */ $settings = $this->setupSettings(); $this->module->setSettings($settings); $this->module->setData(['module_name' => 'Module', 'namespace' => 'Namespace']); $entity = $this->setupEntity(true); $this->module->addEntity($entity); }