From f6f162dcdd6f19c92603bfbe4f649680561481d1 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 15:37:50 +0200 Subject: [PATCH] fix test by letting mock throw the actual expected exception --- .../Tests/Data/Bundle/Reader/BundleEntryReaderTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php index a5b2f164f9..5e84c9566e 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php @@ -144,7 +144,10 @@ class BundleEntryReaderTest extends TestCase [self::RES_DIR, 'en_GB'], [self::RES_DIR, 'en'] ) - ->willReturnOnConsecutiveCalls(self::$data, self::$fallbackData); + ->willReturnOnConsecutiveCalls( + $this->throwException(new ResourceBundleNotFoundException()), + self::$fallbackData + ); $this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam'])); } @@ -283,7 +286,7 @@ class BundleEntryReaderTest extends TestCase [self::RES_DIR, 'en_GB'], [self::RES_DIR, 'en'] ) - ->willReturnOnConsecutiveCalls(['Foo' => 'Baz'], ['Foo' => 'Baz']); + ->willReturnOnConsecutiveCalls(['Foo' => 'Baz'], ['Foo' => 'Bar']); $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true); }