Commit 4839e850 authored by catch's avatar catch
Browse files

Issue #3181272 by jungle, longwave, Balu Ertl, larowlan: Fix typo in FileStorage error message

(cherry picked from commit 08e22908)
parent bfac796a
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -73,17 +73,15 @@ public function testlistAll() {
  }

  /**
   * Test UnsupportedDataTypeConfigException displays path of
   * erroneous file during read.
   * Tests UnsupportedDataTypeConfigException.
   */
  public function testReadUnsupportedDataTypeConfigException() {
    file_put_contents($this->storage->getFilePath('core.extension'), PHP_EOL . 'foo : [bar}', FILE_APPEND);
    try {
      $config_parsed = $this->storage->read('core.extension');
    }
    catch (UnsupportedDataTypeConfigException $e) {
      $this->assertStringContainsString($this->storage->getFilePath('core.extension'), $e->getMessage(), 'Erroneous file path is displayed.');
    }
  public function testUnsupportedDataTypeConfigException() {
    $name = 'core.extension';
    $path = $this->storage->getFilePath($name);
    $this->expectException(UnsupportedDataTypeConfigException::class);
    $this->expectExceptionMessageMatches("@Invalid data type in config $name, found in file $path: @");
    file_put_contents($path, PHP_EOL . 'foo : @bar', FILE_APPEND);
    $this->storage->read($name);
  }

}
+1 −1

File changed.

Contains only whitespace changes.