예제 #1
0
 /**
  * @expectedException \Exception
  */
 public function test_getUserId_failed()
 {
     /** === Test Data === */
     $USER_ID = 'user id';
     $REQUEST = 'xml request';
     $CONTEXT = 'context';
     /** === Setup Mocks === */
     // $request = $this->_adapter->encodeXml('login', $params, $outOpts);
     $this->mAdapter->shouldReceive('encodeXml')->once()->andReturn($REQUEST);
     // $context = $this->_adapter->createContext($contextOpts);
     $this->mAdapter->shouldReceive('createContext')->once()->andReturn($CONTEXT);
     // $contents = $this->_adapter->getContents($uri, $context);
     $this->mAdapter->shouldReceive('getContents')->once()->andReturn(false);
     // $this->_logger->critical($msg);
     $this->mLogger->shouldReceive('critical')->once();
     /** === Call and asserts  === */
     $res = $this->obj->getUserId();
     $this->assertEquals($USER_ID, $res);
 }
예제 #2
0
 public function test_getUserId()
 {
     $this->obj->getUserId();
     return;
 }