summaryrefslogtreecommitdiff
path: root/tests/cpp/include/variables/001-process_globals.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/001-process_globals.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/001-process_globals.h')
-rw-r--r--tests/cpp/include/variables/001-process_globals.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/cpp/include/variables/001-process_globals.h b/tests/cpp/include/variables/001-process_globals.h
deleted file mode 100644
index ae930d2..0000000
--- a/tests/cpp/include/variables/001-process_globals.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * Test variables
- * 001-process_globals.phpt
- * Global variables in PHP-CPP
- *
- */
-
-
-
-
-/**
- * Set up namespace
- */
-namespace TestVariables {
-
-
-
- /**
- * process_globals()
- *
- * This function reads and modifies global variables
- */
- Php::Value process_globals()
- {
- // all global variables can be accessed via the Php::GLOBALS variable,
- // which is more or less the same as the PHP $_GLOBALS variable
-
- // set a global variable
- Php::GLOBALS["a"] = 1;
-
- // increment a global variable
- Php::GLOBALS["b"] += 1;
-
- // set a global variable to be an array
- Php::GLOBALS["c"] = Php::Array();
-
- // add a member to an array
- Php::GLOBALS["c"]["member"] = 123;
-
- // and increment it
- Php::GLOBALS["c"]["member"] += 77;
-
- // change value e
- Php::GLOBALS["e"] = Php::GLOBALS["e"][0]("hello");
-
- // if a global variable holds a function, we can call it
- return Php::GLOBALS["d"](1,2,3);
- }
-
-
-
-/**
- * End of namespace
- */
-}
-