Example #1
0
 /**
  * Testcase Constructor.
  */
 public function setUp()
 {
     $this->cas = $this->getMock('Lunr\\Spark\\CentralAuthenticationStore');
     $this->curl = $this->getMock('Lunr\\Network\\Curl');
     $this->logger = $this->getMock('Psr\\Log\\LoggerInterface');
     $this->request = $this->getMock('Lunr\\Corona\\RequestInterface');
     $this->response = $this->getMockBuilder('Lunr\\Network\\CurlResponse')->disableOriginalConstructor()->getMock();
     $this->request->expects($this->at(0))->method('get_get_data')->with($this->equalTo('state'))->will($this->returnValue('String'));
     $this->request->expects($this->at(1))->method('get_get_data')->with($this->equalTo('code'))->will($this->returnValue('String'));
     $this->request->expects($this->exactly(2))->method('__get')->will($this->onConsecutiveCalls('http://localhost/', 'controller/method/'));
     $this->class = new Authentication($this->cas, $this->logger, $this->curl, $this->request);
     $this->reflection = new ReflectionClass('Lunr\\Spark\\Facebook\\Authentication');
 }