/** * Update Website * * @param Website $websiteOrigin * @param Website $website * @return array */ public function test(Website $websiteOrigin, Website $website) { //Preconditions $websiteOrigin->persist(); //Steps $this->storeIndex->open(); $this->storeIndex->getStoreGrid()->searchAndOpenWebsite($websiteOrigin); $this->editWebsite->getEditFormWebsite()->fill($website); $this->editWebsite->getFormPageActions()->save(); return ['website' => $this->mergeFixture($website, $websiteOrigin)]; }
/** * Assert that displayed Website data on edit page equals passed from fixture * * @param StoreIndex $storeIndex * @param EditWebsite $editWebsite * @param Website $website * @return void */ public function processAssert(StoreIndex $storeIndex, EditWebsite $editWebsite, Website $website) { $fixtureData = $website->getData(); $storeIndex->open()->getStoreGrid()->searchAndOpenWebsite($website); $formData = $editWebsite->getEditFormWebsite()->getData(); $errors = $this->verifyData($fixtureData, $formData); \PHPUnit_Framework_Assert::assertEmpty($errors, $errors); }