/** * @expectedException \Magento\Framework\Exception\LocalizedException * @expectedExceptionMessage header_logo_src does not contain field 'file' */ public function testBeforeSaveWithoutFile() { $this->fileBackend->setData(['value' => ['test' => ''], 'field_config' => ['field' => 'header_logo_src']]); $this->fileBackend->beforeSave(); }