/** * Upgrade Magento via Magento Connect Manager. * * @param AssertChannelTextPresent $assertChannelTextPresent * @param User $adminUser * @param Connect $connect * @return array */ public function test(AssertChannelTextPresent $assertChannelTextPresent, User $adminUser, Connect $connect) { $this->connectManagerPage->open(); $this->connectManagerPage->getConnectLogin()->loginToConnectManager($adminUser); $assertChannelTextPresent->processAssert($this->connectManagerPage); $this->connectManagerPage->getConnectContent()->checkForUpgrades(); $this->connectManagerPage->getConnectContent()->selectPackages($connect); $this->connectManagerPage->getConnectContent()->commitChanges(); }
/** * Verification of title * * @param ConnectManager $connectManager * @return void */ public function processAssert(ConnectManager $connectManager) { \PHPUnit_Framework_Assert::assertContains(self::CONNECT_CHANNEL_TEXT, $connectManager->getConnectContent()->getChannelTitle(), 'License agreement text is absent.'); }
/** * Assert that upgrade via Connect Manager has been successfully * * @param ConnectManager $connectManager */ public function processAssert(ConnectManager $connectManager) { \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_MESSAGE, $connectManager->getMessages()->getSuccessMessages()); }