From 0be527177fea38f9773cd05e8b3e2c53fc3c2456 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 14 Feb 2015 13:47:23 +0100 Subject: [PATCH] Skip missed dependencies in ResourcesTest::testUnsatisfiableDependencies When a dependency is missing the test ResourcesTest::testUnsatisfiableDependencies gives a error because of Undefined index and stops further checks. Skip this situation because the existing test ResourcesTest::testMissingDependencies already gives a failure with a better explanation in this situation. Change-Id: I71a88551df67d52ea96bf7283b5de892692f9336 --- tests/phpunit/structure/ResourcesTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/structure/ResourcesTest.php b/tests/phpunit/structure/ResourcesTest.php index 2396ea2923..16a9f3a06e 100644 --- a/tests/phpunit/structure/ResourcesTest.php +++ b/tests/phpunit/structure/ResourcesTest.php @@ -91,6 +91,10 @@ class ResourcesTest extends MediaWikiTestCase { foreach ( $data['modules'] as $moduleName => $module ) { $moduleTargets = $module->getTargets(); foreach ( $module->getDependencies() as $dep ) { + if ( !isset( $data['modules'][$dep] ) ) { + // Missing dependencies reported by testMissingDependencies + continue; + } $targets = $data['modules'][$dep]->getTargets(); foreach ( $moduleTargets as $moduleTarget ) { $this->assertContains( -- 2.20.1