コード例 #1
0
 /**
  * Run before each test.
  */
 public function setUp()
 {
     parent::setUp();
     $uri = Uri::createFromString('https://example.com:443/foo/bar?abc=123');
     $this->request = new Request('GET', $uri, new Headers(), [], Environment::mock()->all(), new Body(fopen('php://temp', 'r+')));
     $this->response = new Response();
     // Prepare container and populate it with Slim services that are needed for further tests
     $this->addToContainer('callableResolver', function ($c) {
         return new CallableResolver($c);
     });
     $this->addToContainer('foundHandler', function ($c) {
         return new RequestResponse();
     });
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->application = new Application();
 }