configuration = new Configuration(true); $this->processor = new Processor(); } public function testThrowsIfNameIsEmpty() { $config = $this->getValidConfig(); $config['name'] = ''; $this->expectException(\Exception::class); $this->validateConfig($config); } private function validateConfig(array $config): array { return $this->processor->processConfiguration($this->configuration, [$config]); } private function getValidConfig(): array { return [ 'name' => 'Boris', ]; } }