10000 [Intl] fix test by letting mock throw the actual expected exception by xabbuh · Pull Request #38234 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Intl] fix test by letting mock throw the actual expected exception #38234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix test by letting mock throw the actual expected exception
  • Loading branch information
xabbuh committed Sep 18, 2020
commit f6f162dcdd6f19c92603bfbe4f649680561481d1
8711
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ public function testFallbackIfLocaleDoesNotExist()
[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']));
}
Expand Down Expand Up @@ -283,7 +286,7 @@ public function testFailIfEntryFoundNeitherInParentNorChild()
[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);
}
Expand Down
0