예제 #1
0
파일: LocatorTest.php 프로젝트: elgg/elgg
 public function testIgnoresNonRequiredUpgrade()
 {
     // Mock an upgrade that does not need to be ran
     $this->plugin->expects($this->any())->method('getStaticConfig')->will($this->returnCallback(function ($name) {
         if ($name == 'upgrades') {
             return [\Elgg\Upgrade\NonRequiredTestBatch::class];
         }
     }));
     $upgrades = _elgg_services()->upgradeLocator->getUpgrades($this->plugin);
     $this->assertEmpty($upgrades);
 }