Elgg\Upgrade\LocatorTest::testIgnoresNonRequiredUpgrade PHP Method

testIgnoresNonRequiredUpgrade() public method

    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);
    }