8000 fix test by letting mock throw the actual expected exception · symfony/symfony@f6f162d · GitHub
[go: up one dir, main page]

Skip to content

Commit f6f162d

Browse files
committed
fix test by letting mock throw the actual expected exception
1 parent da644e6 commit f6f162d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ public function testFallbackIfLocaleDoesNotExist()
144144
[self::RES_DIR, 'en_GB'],
145145
[self::RES_DIR, 'en']
146146
)
147-
->willReturnOnConsecutiveCalls(self::$data, self::$fallbackData);
147+
->willReturnOnConsecutiveCalls(
148+
$this->throwException(new ResourceBundleNotFoundException()),
149+
self::$fallbackData
150+
);
148151

149152
$this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam']));
150153
}
@@ -283,7 +286,7 @@ public function testFailIfEntryFoundNeitherInParentNorChild()
283286
[self::RES_DIR, 'en_GB'],
284287
[self::RES_DIR, 'en']
285288
)
286-
->willReturnOnConsecutiveCalls(['Foo' => 'Baz'], ['Foo' => 'Baz']);
289+
->willReturnOnConsecutiveCalls(['Foo' => 'Baz'], ['Foo' => 'Bar']);
287290

288291
$this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true);
289292
}

0 commit comments

Comments
 (0)
0