public function let(PropertyAccessorInterface $propertyAccessor, MappingConfigurator $mappingConfigurator, Factory $factory, EventDispatcherInterface $eventDispatcher) { $mappingConfigurator->isPropertyVisible(['id'])->willReturn(true); $mappingConfigurator->isPropertyVisible(['a'])->willReturn(true); $mappingConfigurator->hasRelation(['a'])->willReturn(false); $this->beConstructedWith($propertyAccessor, $factory, $mappingConfigurator, $eventDispatcher); }
/** * @param array $path * @return bool */ private function isPropertyVisible(array $path) { return !$this->mappingConfigurator || $this->mappingConfigurator->isPropertyVisible($path); }