Esempio n. 1
0
 /**
  * Constructor.
  *
  * @param Context $context the context.
  * @param Session $session the user session.
  * @param array $data optional data.
  */
 public function __construct(TemplateContext $templateContext, HttpContext $httpContext, Session $session, array $data = [])
 {
     parent::__construct($templateContext, $httpContext, $data);
     $this->_session = $session;
 }
Esempio n. 2
0
 /**
  * @param $isLoggedIn
  * @param $result
  * @dataProvider customerLoggedInDataProvider
  */
 public function testCustomerLoggedIn($isLoggedIn, $result)
 {
     $this->httpContext->expects($this->once())->method('getValue')->with(\Magento\Customer\Model\Context::CONTEXT_AUTH)->willReturn($isLoggedIn);
     $this->assertSame($result, $this->block->customerLoggedIn($isLoggedIn));
 }