Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Perl
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
t
README.pod

README.pod

NAME

Test::Mock::PSGI

SYNOPSIS

  use Test::Mock::PSGI;
  use LWP::Simple;
  
  my $mock = Test::Mock::PSGI->new;
  $mock->maps(
      'http://www.google.com/' => sub {
          return [ 200, [], [ 'gooogle' ] ]
      },
  );
  
  {
      my $session = $mock->session;
      is(get('http://www.google.com/'), 'gooogle');
      ok($session->verify);
  };
  
  {
      my $session = $mock->session;
      ok(! get('http://www.amazon.com/'));
      ok(! $session->verify);
  };

SEE ALSO

Test::Mock::LWP

Test::HTTP::Server::Simple

Something went wrong with that request. Please try again.