/** * {@inheritdoc} */ public function getUser() { if (null === $this->customer) { return null; } return $this->customer->getUser(); }
/** * @Then the customer :customer should have an account created * @Then /^(this customer) should have an account created$/ */ public function theyShouldHaveAnAccountCreated(CustomerInterface $customer) { Assert::notNull($customer->getUser()->getPassword(), 'Customer should have an account, but they do not.'); }