summaryrefslogtreecommitdiff
path: root/tests/cpp/include/variables/009-010-value-object.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-05 10:25:57 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-05 10:25:57 +0100
commitaec191bc6cbb83884466800a750ecad0b37e254f (patch)
treef52fe2b9551056580c5c519fb78a3c5600e1034a /tests/cpp/include/variables/009-010-value-object.h
parentaf530282f530580c1ed7bc184df0a727068275e1 (diff)
remove test framework, it never works, most of the bugs found by the test framework turn out to be caused by errors in the tests instead of errors in the real code, people complain about it all the time, and basically this whole test framework causes more problems than it solves, solves issue #215 and solves issue #221
Diffstat (limited to 'tests/cpp/include/variables/009-010-value-object.h')
-rw-r--r--tests/cpp/include/variables/009-010-value-object.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/tests/cpp/include/variables/009-010-value-object.h b/tests/cpp/include/variables/009-010-value-object.h
deleted file mode 100644
index e3eba85..0000000
--- a/tests/cpp/include/variables/009-010-value-object.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- *
- * Test variables
- * 009-value-object.phpt
- * 010-value-object2.phpt
- *
- */
-
-
-/**
- * Set up namespace
- */
-namespace TestVariables {
-
-
- /*
- * Test Php::Value object
- */
- Php::Value value_object1(void)
- {
-
- // create empty object of type stdClass
- Php::Object object;
-
- // object properties can be accessed with square brackets
- object["property1"] = "value1";
- object["property2"] = "value2";
-
- // Php::Value is the base class, so you can assign Php::Object objects
- //Php::Value value = object;
-
- return object;
- }
-
- /*
- * Test Php::Value object
- */
- Php::Value value_object2(void)
- {
-
- // create empty object of type stdClass
- Php::Object object;
-
- // to create an object of a different type, pass in the class name
- // to the constructor with optional constructor parameters
- //object = Php::Object("DateTime", "2014-03-27 00:37:15.638276");
-
- auto timeZone = Php::Object("DateTimeZone", "Europe/Amsterdam");
- object = Php::Object("DateTime", "2014-03-27 00:37:15", timeZone);
-
-
- // methods can be called with the call() method
- Php::out << object.call("format", "Y-m-d H:i:s") << std::endl;
-
- // all these methods can be called on a Php::Value object too
- Php::Value value = Php::Object("DateTime", "2016-03-31 15:48:00", timeZone);
- Php::out << value.call("format", "Y-m-d H:i:s") << std::endl;
- Php::out << value.call("getOffset") << std::endl;
-
- return object;
- }
-
-
-/**
- * End of namespace
- */
-}
-