+ Added INI entries: http.log.not_found, http.send.not_found_404
[m6w6/ext-http] / tests / HttpResponse_005.phpt
diff --git a/tests/HttpResponse_005.phpt b/tests/HttpResponse_005.phpt
new file mode 100644 (file)
index 0000000..e7b2cdb
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+HttpResponse file not found
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkcgi();
+checkmin(5.1);
+?>
+--FILE--
+<?php
+ini_set("error_reporting", 0);
+ini_set("default_mimetype", "text/plain");
+
+HttpResponse::setContentType("application/pdf");
+HttpResponse::setContentDisposition("doc.pdf");
+HttpResponse::setFile("__nonexistant__.pdf");
+HttpResponse::send();
+?>
+--EXPECTF--
+Status: 404
+X-Powered-By: PHP/%s
+Content-Type: text/plain
+Content-Disposition:
+
+File not found