8000 minor #38234 [Intl] fix test by letting mock throw the actual expecte… · symfony/symfony@7fa1257 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7fa1257

Browse files
committed
minor #38234 [Intl] fix test by letting mock throw the actual expected exception (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [Intl] fix test by letting mock throw the actual expected exception | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #37808 | License | MIT | Doc PR | This fixes a mistake I made when rewriting the tests in #37808. Commits ------- f6f162d fix test by letting mock throw the actual expected exception
2 parents da644e6 + f6f162d commit 7fa1257

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