function it_checks_if_account_was_deleted(SharedStorageInterface $sharedStorage, UserInterface $user, CustomerInterface $customer, CustomerShowPage $customerShowPage) { $sharedStorage->get('deleted_user')->willReturn($user); $user->getCustomer()->willReturn($customer); $customer->getId()->willReturn(1); $customerShowPage->open(['id' => 1])->shouldBeCalled(); $customerShowPage->isRegistered()->willReturn(false); $this->accountShouldBeDeleted(); }
function it_checks_if_customer_still_exists(CustomerShowPage $customerShowPage, SharedStorageInterface $sharedStorage, CustomerInterface $customer, UserInterface $user) { $sharedStorage->get('deleted_user')->shouldBeCalled()->willReturn($user); $user->getCustomer()->willReturn($customer); $customer->getId()->willReturn(1); $customerShowPage->open(['id' => 1])->shouldBeCalled(); $customerShowPage->isRegistered()->willReturn(false); $this->customerShouldStillExist(); }
/** * @Then the user account should be deleted */ public function accountShouldBeDeleted() { $deletedUser = $this->sharedStorage->get('deleted_user'); $this->customerShowPage->open(['id' => $deletedUser->getCustomer()->getId()]); expect($this->customerShowPage->isRegistered())->toBe(false); }