summaryrefslogtreecommitdiff
path: root/tests/cpp/include/variables/026-post-raw2.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/026-post-raw2.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/026-post-raw2.h')
-rw-r--r--tests/cpp/include/variables/026-post-raw2.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/tests/cpp/include/variables/026-post-raw2.h b/tests/cpp/include/variables/026-post-raw2.h
deleted file mode 100644
index d250dc8..0000000
--- a/tests/cpp/include/variables/026-post-raw2.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- *
- * Test superglobal variables _POST
- * 026-post-raw2.phpt
- *
- */
-
-
-#include <iostream>
-#include <fstream>
-
-/**
- * Set up namespace
- */
-namespace TestVariables {
- using namespace Php;
-
-
- /*
- * Test
- */
- void post_raw2(void)
- {
- out << "name1 : "<< FILES["flnm"]["name"][0] << std::endl;
- out << "name2 : "<< FILES["flnm"]["name"][1] << std::endl;
-
- out << "type1 : "<< FILES["flnm"]["type"][0] << std::endl;
- out << "type2 : "<< FILES["flnm"]["type"][1] << std::endl;
-
- out << "error1 : "<< FILES["flnm"]["error"][0] << std::endl;
- out << "error2 : "<< FILES["flnm"]["error"][1] << std::endl;
-
- out << "size1 : "<< FILES["flnm"]["size"][0] << std::endl;
- out << "size2 : "<< FILES["flnm"]["size"][1] << std::endl;
-
-
- int length0 = FILES["flnm"]["size"][0];
- int length1 = FILES["flnm"]["size"][1];
- char *buffer0, *buffer1;
-
- std::ifstream file0, file1;
- std::string filename0 = FILES["flnm"]["tmp_name"][0];
- std::string filename1 = FILES["flnm"]["tmp_name"][1];
-
- file0.open(filename0, std::ios::in | std::ios::binary);
- file1.open(filename1, std::ios::in | std::ios::binary);
-
- if(!file0.is_open() || !file1.is_open()) {
- out << "Cannot open file." << std::endl;
- return;
- }
-
- //allocate memory
- buffer0 = new char[length0];
- buffer1 = new char[length1];
-
- //read data as a block to buffer
- file0.read(buffer0, length0);
- file1.read(buffer1, length1);
- file0.close();
- file1.close();
-
- out << "content1 : ";
- out.write(buffer0, length0);
- out << std::endl;
- out << "content2 : "<< buffer1 << std::endl;
-
- delete[] buffer0;
- delete[] buffer1;
- }
-
-/**
- * End of namespace
- */
-}
-