diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-11-05 10:25:57 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-11-05 10:25:57 +0100 |
commit | aec191bc6cbb83884466800a750ecad0b37e254f (patch) | |
tree | f52fe2b9551056580c5c519fb78a3c5600e1034a /tests/php/phpt/variables/003-value-types.phpt | |
parent | af530282f530580c1ed7bc184df0a727068275e1 (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/php/phpt/variables/003-value-types.phpt')
-rw-r--r-- | tests/php/phpt/variables/003-value-types.phpt | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/tests/php/phpt/variables/003-value-types.phpt b/tests/php/phpt/variables/003-value-types.phpt deleted file mode 100644 index 477fbe2..0000000 --- a/tests/php/phpt/variables/003-value-types.phpt +++ /dev/null @@ -1,72 +0,0 @@ ---TEST-- -get_complex_array ---SKIPIF-- -<?php if (!extension_loaded("extension_for_tests")) print "skip"; ?> ---FILEEOF-- -<?php - - -# check Callable: http://php.net/manual/en/function.is-callable.php -function ret5() {return 5;} -class someClass { - function someMethod() {return 5;} -} -class CallableClass { - public function __invoke(){} -} - -$anObject = new someClass(); -$methodVariable = array($anObject, 'someMethod'); - - -# check array -$arr = array( - 'Null' => NULL, - 'Numeric' => 2014, - 'Float' => 3.14, - 'Bool' => true, - 'Array' => array(5,'a' => 33, 'str'), - 'Object' => new stdClass(), - 'String' => 'String', - 'Resource' => 7, - 'Constant' => 5, - 'ConstantArray' => 11, - 'Callable1' => 'ret5', - 'Callable2' => $methodVariable, - 'Callable3' => function () {return 5;}, - 'Callable4' => new CallableClass() -); - -TestVariables\value_types($arr); - -//To check uncomment the following lines: -/* -echo "\n\nCallable1:"; -var_export(is_callable($arr['Callable1'])); -echo PHP_EOL,'Callable2:'; -var_export(is_callable($arr['Callable2'])); -echo PHP_EOL,'Callable3:'; -var_export(is_callable($arr['Callable3'])); -echo PHP_EOL,'Callable4:'; -var_export(is_callable($arr['Callable4'])); -echo PHP_EOL,'No Callable:'; -var_export(is_callable(new stdClass)); -*/ - - -echo PHP_EOL; ---EXPECT-- -Null: Yes -Numeric: Yes -Float: Yes -Bool: Yes -Array: Yes -Object: Yes -String: Yes -Resource: No -Constant: No -ConstantArray: No -Callable1: Yes -Callable2: Yes -Callable3: Yes -Callable4: Yes
\ No newline at end of file |