Unverified Commit a3e497b7 authored by Alex Pott's avatar Alex Pott
Browse files

Revert "Issue #3181272 by jungle, longwave, Balu Ertl, larowlan: Fix typo in...

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

This reverts commit 4839e850.
parent be69c007
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -73,15 +73,17 @@ public function testlistAll() {
  }

  /**
   * Tests UnsupportedDataTypeConfigException.
   * Test UnsupportedDataTypeConfigException displays path of
   * erroneous file during read.
   */
  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);
  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.');
    }
  }

}
+1 −1

File changed.

Contains only whitespace changes.