summaryrefslogtreecommitdiff
path: root/tests/php/phpt/variables/006-casting-obj2str.phpt
diff options
context:
space:
mode:
authorvalmat <ufabiz@gmail.com>2014-03-27 01:19:12 +0600
committervalmat <ufabiz@gmail.com>2014-03-27 01:19:12 +0600
commitd0d062b4a05a9eb64b8d2e6d038af96ac532e4b3 (patch)
tree4fc4026b988ca6da18a88d2e34dd1d88c28d24ae /tests/php/phpt/variables/006-casting-obj2str.phpt
parent702c95cf779226550af6b33255a8e1b28ccca428 (diff)
Added new tests.
Due to support zts broke the ability to run tests without installation - fixed.
Diffstat (limited to 'tests/php/phpt/variables/006-casting-obj2str.phpt')
-rw-r--r--tests/php/phpt/variables/006-casting-obj2str.phpt31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/php/phpt/variables/006-casting-obj2str.phpt b/tests/php/phpt/variables/006-casting-obj2str.phpt
new file mode 100644
index 0000000..53d9707
--- /dev/null
+++ b/tests/php/phpt/variables/006-casting-obj2str.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test Php::Value casting operators (object to string)
+--DESCRIPTION--
+
+Converting a php object to a string
+
+
+--SKIPIF--
+<?php if (!extension_loaded("extension_for_tests")) print "skip"; ?>
+--FILEEOF--
+<?php
+
+
+function native_value_casting($value) {
+ echo (string)$value, PHP_EOL;
+}
+class TestClass
+{
+ public function __toString() {return "I am TestClass";}
+}
+
+TestVariables\value_cast2str(new TestClass());
+//native_value_casting(new TestClass());
+
+TestVariables\value_cast2str("some string");
+
+
+
+--EXPECT--
+I am TestClass
+some string \ No newline at end of file