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
-------
f6f162dcdd
fix test by letting mock throw the actual expected exception
This commit is contained in:
commit
7fa12576ef
@ -144,7 +144,10 @@ class BundleEntryReaderTest extends TestCase
|
|||||||
[self::RES_DIR, 'en_GB'],
|
[self::RES_DIR, 'en_GB'],
|
||||||
[self::RES_DIR, 'en']
|
[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']));
|
$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_GB'],
|
||||||
[self::RES_DIR, 'en']
|
[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);
|
$this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user