Ejemplo n.º 1
0
 /**
  * @test
  */
 public function shouldAllowGetUrlSetInConstructor()
 {
     $expectedUrl = 'theUrl';
     $request = new HttpRedirect($expectedUrl);
     $this->assertEquals($expectedUrl, $request->getUrl());
 }
    /**
     * @test
     */
    public function shouldLogHttpRedirectReplyWithUrlIncludedOnReply()
    {
        $action = new FooAction();
        $reply = new HttpRedirect('http://example.com');

        $logger = $this->createLoggerMock();
        $logger
            ->expects($this->at(0))
            ->method('debug')
            ->with('[Payum] 1# FooAction::execute(string) throws reply HttpRedirect{url: '.$reply->getUrl().'}')
        ;

        $extension = new LogExecutedActionsExtension($logger);

        $extension->onPreExecute('string');
        $extension->onReply($reply, 'string', $action);
    }