Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->urlGenerator = $this->getMock('\\Drupal\\Core\\Routing\\UrlGeneratorInterface');
     $this->connection = $this->getMockBuilder('\\Drupal\\Core\\Database\\Connection')->disableOriginalConstructor()->getMock();
     $this->loggerFactory = $this->getMock('\\Drupal\\Core\\Logger\\LoggerChannelFactory');
     $this->loggerChannel = $this->getMockBuilder('\\Drupal\\Core\\Logger\\LoggerChannel')->disableOriginalConstructor()->getMock();
     $this->loggerFactory->expects($this->any())->method('get')->with('cas')->will($this->returnValue($this->loggerChannel));
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->urlGenerator = $this->getMock('\\Drupal\\Core\\Routing\\UrlGeneratorInterface');
     $this->connection = $this->getMockBuilder('\\Drupal\\Core\\Database\\Connection')->disableOriginalConstructor()->getMock();
     $this->loggerFactory = $this->getMock('\\Drupal\\Core\\Logger\\LoggerChannelFactory');
     $this->loggerChannel = $this->getMockBuilder('\\Drupal\\Core\\Logger\\LoggerChannel')->disableOriginalConstructor()->getMock();
     $this->loggerFactory->expects($this->any())->method('get')->with('cas')->will($this->returnValue($this->loggerChannel));
     $storage = $this->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage')->setMethods(NULL)->getMock();
     $this->session = $this->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\Session')->setConstructorArgs(array($storage))->setMethods(NULL)->getMock();
     $this->session->start();
 }