Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerLogin.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Cms\Test\Page\CmsIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertCustomerLogin extends AbstractConstraint
17 {
25  public function processAssert(CmsIndex $cmsIndex, Customer $customer)
26  {
27  $this->objectManager->create(
28  \Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
29  ['customer' => $customer]
30  )->run();
31 
32  \PHPUnit\Framework\Assert::assertFalse(
33  $cmsIndex->getLinksBlock()->isAuthorizationVisible(),
34  "Authorisation link is visible after Login attempt."
35  );
36  }
37 
43  public function toString()
44  {
45  return "Customer is successfully logged in.";
46  }
47 }
$customer
Definition: customers.php:11
processAssert(CmsIndex $cmsIndex, Customer $customer)