Bolt\Tests\Nut\ExtensionsUninstallTest::testRun PHP Method

testRun() public method

public testRun ( )
    public function testRun()
    {
        $app = $this->getApp();
        $runner = $this->getMockBuilder(PackageManager::class)->setMethods(['removePackage'])->setConstructorArgs([$app])->getMock();
        $runner->expects($this->any())->method('removePackage')->will($this->returnValue(0));
        $app['extend.manager'] = $runner;
        $command = new ExtensionsUninstall($app);
        $tester = new CommandTester($command);
        $tester->execute(['name' => 'test']);
        $result = $tester->getDisplay();
        $this->assertRegExp('/Starting uninstall of test… \\[DONE\\]/', trim($result));
    }
ExtensionsUninstallTest