N98\Magento\Command\System\Setup\ChangeVersionCommandTest::testCommandReturnsEarlyIfNoSetupResourcesForModule PHP Метод

testCommandReturnsEarlyIfNoSetupResourcesForModule() публичный Метод

    public function testCommandReturnsEarlyIfNoSetupResourcesForModule()
    {
        $command = $this->getMockBuilder('\\N98\\Magento\\Command\\System\\Setup\\ChangeVersionCommand')->setMethods(array('getModuleSetupResources'))->getMock();
        $command->expects($this->once())->method('getModuleSetupResources')->with('Mage_Weee')->will($this->returnValue(array()));
        $application = $this->getApplication();
        $application->add($command);
        $command = $this->getApplication()->find('sys:setup:change-version');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), 'module' => 'Mage_Weee', 'version' => '1.0.0.0', 'setup' => 'weee_setup'));
        $this->assertContains('No setup resources found for module: "Mage_Weee"', $commandTester->getDisplay());
    }