com php-src: Test http_response_code function: ext/st andard/tests/general_functions/http_response_code.phpt
| From: | Gabriel Caruso | Date: | Mon, 16 Jul 2018 02:51:16 +0000 |
| Subject: | com php-src: Test http_response_code function: ext/st andard/tests/general_functions/http_response_code.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102555@lists.php.net to get a copy of this message | ||
Commit: 59456974f2c8d27da66d326c337d657b5f6b5d00
Author: Gabriel Caruso <carusogabriel34@gmail.com> Sun, 15 Jul 2018 23:51:16 -0300
Parents: cf5f26b260adbcaf0349810724accb1dcc146878
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=59456974f2c8d27da66d326c337d657b5f6b5d00
Log:
Test http_response_code function
Changed paths:
A ext/standard/tests/general_functions/http_response_code.phpt
Diff:
diff --git a/ext/standard/tests/general_functions/http_response_code.phpt
b/ext/standard/tests/general_functions/http_response_code.phpt
new file mode 100644
index 0000000..bc2775f
--- /dev/null
+++ b/ext/standard/tests/general_functions/http_response_code.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Test http_response_code basic functionality
+--CREDITS--
+Gabriel Caruso (carusogabriel@php.net)
+--FILE--
+<?php
+var_dump(
+ // Get the current default response code
+ http_response_code(),
+ // Set a response code
+ http_response_code(201),
+ // Get the new response code
+ http_response_code()
+);
+?>
+--EXPECT--
+bool(false)
+bool(true)
+int(201)