php-src/sapi/cli/tests/005.phpt

105 lines
1.9 KiB
Plaintext
Raw Normal View History

2006-11-24 13:32:07 +00:00
--TEST--
show information about class
--SKIPIF--
<?php
include "skipif.inc";
if (!extension_loaded("reflection")) {
die("skip reflection extension required");
}
?>
2006-11-24 13:32:07 +00:00
--FILE--
<?php
2007-01-20 22:12:45 +00:00
$php = getenv('TEST_PHP_EXECUTABLE');
2006-11-24 13:32:07 +00:00
var_dump(`"$php" -n --rc unknown`);
var_dump(`"$php" -n --rc stdclass`);
var_dump(`"$php" -n --rc exception`);
2006-11-24 13:32:07 +00:00
echo "Done\n";
?>
--EXPECTF--
string(40) "Exception: Class unknown does not exist
"
2008-12-31 12:32:59 +00:00
string(183) "Class [ <internal:Core> class stdClass ] {
2006-11-24 13:32:07 +00:00
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [0] {
}
}
"
2008-12-31 12:32:59 +00:00
string(1355) "Class [ <internal:Core> class Exception ] {
2006-11-24 13:32:07 +00:00
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
2008-12-31 12:32:59 +00:00
- Properties [7] {
2006-11-24 13:32:07 +00:00
Property [ <default> protected $message ]
Property [ <default> private $string ]
Property [ <default> protected $code ]
Property [ <default> protected $file ]
Property [ <default> protected $line ]
Property [ <default> private $trace ]
2008-12-31 12:32:59 +00:00
Property [ <default> private $previous ]
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
- Methods [10] {
Method [ <internal:Core> final private method __clone ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core, ctor> public method __construct ] {
2006-11-24 13:32:07 +00:00
2008-12-31 12:32:59 +00:00
- Parameters [3] {
2006-11-24 13:32:07 +00:00
Parameter #0 [ <optional> $message ]
Parameter #1 [ <optional> $code ]
2008-12-31 12:32:59 +00:00
Parameter #2 [ <optional> $previous ]
2006-11-24 13:32:07 +00:00
}
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getMessage ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getCode ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getFile ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getLine ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getTrace ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getPrevious ] {
2006-11-24 13:32:07 +00:00
}
2008-12-31 12:32:59 +00:00
Method [ <internal:Core> final public method getTraceAsString ] {
}
Method [ <internal:Core> public method __toString ] {
2006-11-24 13:32:07 +00:00
}
}
}
"
Done