public function testShouldReturnHtml() { \Slim\Environment::mock(array("SCRIPT_NAME" => "/index.php", "PATH_INFO" => "/foo")); $app = new \Slim\Slim(); $app->get("/foo", function () { echo "Success"; }); $middleware = new \Slim\Middleware\ImageResize(array()); $middleware->setApplication($app); $middleware->setNextMiddleware($app); $middleware->call(); $this->assertEquals(200, $app->response()->status()); $this->assertEquals("text/html", $app->response()->header("Content-Type")); }