dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Use IResultWrapper in UserArray and TitleArray"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
resourceloader
/
ResourceLoaderImageTest.php
diff --git
a/tests/phpunit/includes/resourceloader/ResourceLoaderImageTest.php
b/tests/phpunit/includes/resourceloader/ResourceLoaderImageTest.php
index
aea2776
..
35c3ef6
100644
(file)
--- a/
tests/phpunit/includes/resourceloader/ResourceLoaderImageTest.php
+++ b/
tests/phpunit/includes/resourceloader/ResourceLoaderImageTest.php
@@
-15,8
+15,8
@@
class ResourceLoaderImageTest extends ResourceLoaderTestCase {
protected function getTestImage( $name ) {
$options = ResourceLoaderImageModuleTest::$commonImageData[$name];
$fileDescriptor = is_string( $options ) ? $options : $options['file'];
protected function getTestImage( $name ) {
$options = ResourceLoaderImageModuleTest::$commonImageData[$name];
$fileDescriptor = is_string( $options ) ? $options : $options['file'];
- $allowedVariants =
is_array( $options ) &&
-
isset( $options['variants'] ) ?
$options['variants'] : [];
+ $allowedVariants =
( is_array( $options ) && isset( $options['variants'] ) ) ?
+ $options['variants'] : [];
$variants = array_fill_keys( $allowedVariants, [ 'color' => 'red' ] );
return new ResourceLoaderImageTestable(
$name,
$variants = array_fill_keys( $allowedVariants, [ 'color' => 'red' ] );
return new ResourceLoaderImageTestable(
$name,
@@
-39,7
+39,9
@@
class ResourceLoaderImageTest extends ResourceLoaderTestCase {
[ 'mno', 'ar', 'mno-rtl.svg' ],
[ 'mno', 'he', 'mno-ltr.svg' ],
[ 'pqr', 'en', 'pqr-b.svg' ],
[ 'mno', 'ar', 'mno-rtl.svg' ],
[ 'mno', 'he', 'mno-ltr.svg' ],
[ 'pqr', 'en', 'pqr-b.svg' ],
+ [ 'pqr', 'en-gb', 'pqr-b.svg' ],
[ 'pqr', 'de', 'pqr-f.svg' ],
[ 'pqr', 'de', 'pqr-f.svg' ],
+ [ 'pqr', 'de-formal', 'pqr-f.svg' ],
[ 'pqr', 'ar', 'pqr-f.svg' ],
[ 'pqr', 'fr', 'pqr-a.svg' ],
[ 'pqr', 'he', 'pqr-a.svg' ],
[ 'pqr', 'ar', 'pqr-f.svg' ],
[ 'pqr', 'fr', 'pqr-a.svg' ],
[ 'pqr', 'he', 'pqr-a.svg' ],
@@
-53,7
+55,9
@@
class ResourceLoaderImageTest extends ResourceLoaderTestCase {
public function testGetPath( $imageName, $languageCode, $path ) {
static $dirMap = [
'en' => 'ltr',
public function testGetPath( $imageName, $languageCode, $path ) {
static $dirMap = [
'en' => 'ltr',
+ 'en-gb' => 'ltr',
'de' => 'ltr',
'de' => 'ltr',
+ 'de-formal' => 'ltr',
'fr' => 'ltr',
'he' => 'rtl',
'ar' => 'rtl',
'fr' => 'ltr',
'he' => 'rtl',
'ar' => 'rtl',