Example #1
0
 /**
  * @Given /^I should verify the file "([^"]*)" exists$/
  */
 public function iShouldVerifyTheFileExists($filename)
 {
     $fid = FeatureHelp::getEntityID('file', $filename);
     $result = db_select('file_usage', 'fu')->fields('fu')->condition('fu.module', 'os_files')->condition('fu.fid', $fid)->execute()->fetchAssoc();
     if (empty($result)) {
         throw new Exception(sprintf("No file usage was found for the file %s", $filename));
     }
 }