forked from laruence/yaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
005.phpt
44 lines (38 loc) · 1.41 KB
/
005.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--TEST--
Check for Yaf_Response
--SKIPIF--
<?php if (!extension_loaded("yaf")) print "skip"; ?>
--INI--
yaf.use_namespace=0
--FILE--
<?php
$response = new Yaf_Response_Cli();
$body = <<<HTML
ifjakdsljfklasdjfkljasdkljfkljadsf
HTML;
$string = "laruence";
$response->appendBody($body);
$response->prependBody($string);
$response->appendBody("kfjdaksljfklajdsfkljasdkljfkjasdf");
$body = $response->getBody();
unset($body);
var_dump(Yaf_Response_Abstract::DEFAULT_BODY);
print_r($response->getBody(NULL));
debug_zval_dump($response->getBody(Yaf_Response_Http::DEFAULT_BODY));
unset($string);
debug_zval_dump($response->getBody());
echo $response;
debug_zval_dump($response->getBody());
$response->response();
debug_zval_dump($response->getBody());
?>
--EXPECTF--
string(7) "content"
Array
(
[content] => laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdf
)
string(75) "laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdf" refcount(1)
string(75) "laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdf" refcount(1)
laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdfstring(75) "laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdf" refcount(1)
laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdfstring(75) "laruenceifjakdsljfklasdjfkljasdkljfkljadsfkfjdaksljfklajdsfkljasdkljfkjasdf" refcount(1)