/**
  * @throws InvalidMappingException
  */
 public function assertSchemaIsValid()
 {
     if ($this->needValidate()) {
         foreach ($this->doctrine->getManagers() as $managerName => $manager) {
             $validator = new SchemaValidator($manager);
             foreach ($validator->validateMapping() as $entity => $errors) {
                 $this->assertAuthorizedMappingErrors($managerName, $entity, $errors);
             }
         }
         $this->saveLastValidateTimestamp();
     }
 }