API: Add ApiParseTest case for 'styles' in getDefaultModules
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 4 May 2018 00:01:40 +0000 (01:01 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 4 May 2018 00:03:47 +0000 (01:03 +0100)
Follows-up a01d8be82c.

Bug: T140664
Change-Id: Ic4151a548884d10a2302af49d89e9e36fd6766fd

tests/phpunit/includes/api/ApiParseTest.php

index a04271f..8a40266 100644 (file)
@@ -133,6 +133,7 @@ class ApiParseTest extends ApiTestCase {
                                ->getMock();
                        $skin->expects( $this->once() )->method( 'getDefaultModules' )
                                ->willReturn( [
+                                       'styles' => [ 'core' => [ 'quux.styles' ] ],
                                        'core' => [ 'foo', 'bar' ],
                                        'content' => [ 'baz' ]
                                ] );
@@ -686,7 +687,7 @@ class ApiParseTest extends ApiTestCase {
                        'resp.parse.modulescripts'
                );
                $this->assertSame(
-                       [ 'foo.styles' ],
+                       [ 'foo.styles', 'quux.styles' ],
                        $res[0]['parse']['modulestyles'],
                        'resp.parse.modulestyles'
                );