isRegistered() public method

Checks if the customer on whose page we are currently on is registered, if not throws an exception.
public isRegistered ( ) : boolean
return boolean
 function it_checks_if_customer_still_exists(ShowPageInterface $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();
 }
Example #2
0
 function it_checks_if_account_was_deleted(SharedStorageInterface $sharedStorage, UserInterface $user, CustomerInterface $customer, ShowPageInterface $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();
 }
Example #3
0
 /**
  * @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);
 }
Example #4
0
 /**
  * @Then the customer with this email should still exist
  */
 public function customerShouldStillExist()
 {
     $deletedUser = $this->sharedStorage->get('deleted_user');
     $this->customerShowPage->open(['id' => $deletedUser->getCustomer()->getId()]);
     Assert::false($this->customerShowPage->isRegistered());
 }