コード例 #1
0
ファイル: LoggerExtensionTest.php プロジェクト: eamador/Payum
 /**
  * @test
  */
 public function shouldDoNothingOnPreExecute()
 {
     $logger = $this->createLoggerMock();
     $extension = new LoggerExtension($logger);
     $action = new LoggerAwareAction();
     $context = new Context($this->createGatewayMock(), new \stdClass(), array());
     $context->setAction($action);
     $extension->onPreExecute($context);
     $this->assertNull($action->logger);
 }
コード例 #2
0
 /**
  * @test
  */
 public function shouldNotInjectLoggerToLoggerAwareActionOnException()
 {
     $logger = $this->createLoggerMock();
     $extension = new LoggerExtension($logger);
     $action = new LoggerAwareAction();
     $extension->onException(new \Exception(), new \stdClass(), $action);
     $this->assertNull($action->logger);
 }