| core_lang

# Class: PhpSyntax_PhpUnit Source Location: /core/lang/ecg/PhpSyntax_PhpUnit.class.php
### Class Overview
    Bs_Assert
       |
       --Bs_TestCase
          |
          --PhpSyntax_PhpUnit
i think this is something for every serious php coder. if you're not absolutely sure what the getType(NULL) returns, if empty(NULL) is TRUE etc, and you are not, then this is something for you too. #### Author(s): andrej arn <at blueshoes dot org> (maintener) Sam Blum <at blueshoes dot org> #### Version: 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:17:48 $ | ### Variables $array $bool $empty $false $int $intFalse $intNeg $intTrue $notSet $null $string $stringFalse $stringInt $stringNeg $stringTrue $stringZero $true | ### Methods PhpSyntax_PhpUnit __PhpSyntax_array_merge __PhpSyntax_compareOne_array __PhpSyntax_compareTwo_array __PhpSyntax_dataTypeEmpty __PhpSyntax_dataTypeNotSet __PhpSyntax_dataTypeNull __PhpSyntax_dataTypeReallyNotSet __PhpSyntax_dataType_expression_compare __PhpSyntax_dataType_expression_true __PhpSyntax_dataType_expression_true_double2_or __PhpSyntax_dataType_expression_true_double2_stroke __PhpSyntax_dataType_expression_true_double_ampersand __PhpSyntax_dataType_expression_true_double_and __PhpSyntax_empty_array __PhpSyntax_empty_bool __PhpSyntax_empty_doubleequals_notSet __PhpSyntax_empty_doubleequals_null __PhpSyntax_empty_empty __PhpSyntax_empty_equals_notSet __PhpSyntax_empty_equals_null __PhpSyntax_empty_notSet __PhpSyntax_empty_null __PhpSyntax_hashKeys_0 __PhpSyntax_hashKeys_1 __PhpSyntax_hashKeys_2 __PhpSyntax_hashKeys_3 __PhpSyntax_hashKeys_4 __PhpSyntax_isSet_array __PhpSyntax_isSet_bool __PhpSyntax_isSet_empty __PhpSyntax_isSet_notSet __PhpSyntax_isSet_null __PhpSyntax_is_null_array __PhpSyntax_is_null_bool __PhpSyntax_is_null_empty __PhpSyntax_is_null_notSet __PhpSyntax_is_null_null __PhpSyntax_lousyBool_int __PhpSyntax_lousyBool_intFalse __PhpSyntax_lousyBool_intNeg __PhpSyntax_lousyBool_intTrue __PhpSyntax_lousyBool_string __PhpSyntax_lousyBool_stringFalse __PhpSyntax_lousyBool_stringInt __PhpSyntax_lousyBool_stringNeg __PhpSyntax_lousyBool_stringTrue __PhpSyntax_lousyBool_stringZero __PhpSyntax_lousyEquals_stringInt_int __PhpSyntax_lousyEquals_string_int __PhpSyntax_lousyEquals_string_intTrue __PhpSyntax_lousyEquals_string_stringTrue __PhpSyntax_lousyEquals_string_true __PhpSyntax_null_doubleequals_notSet __PhpSyntax_null_equals_notSet __PhpSyntax_prePostDeIncrement_1 __PhpSyntax_prePostDeIncrement_2 __PhpSyntax_prePostDeIncrement_11 __PhpSyntax_prePostDeIncrement_12 __PhpSyntax_reference_1 __PhpSyntax_reference_2 __PhpSyntax_reference_3 __PhpSyntax_reference_4 __PhpSyntax_strongEquals_stringInt_int __PhpSyntax_strongEquals_string_int __PhpSyntax_strongEquals_string_intTrue __PhpSyntax_strongEquals_string_stringTrue __PhpSyntax_strongEquals_string_true __PhpSyntax_toBool_empty __PhpSyntax_toBool_notSet __PhpSyntax_toBool_null
### Inherited Variables #### Class: Bs_TestCase Bs_TestCase::$_fExceptions Bs_TestCase::$_fName Bs_TestCase::$_fResult | ### Inherited Methods #### Class: Bs_TestCase Bs_TestCase::Bs_TestCase() Bs_TestCase::countTestCases() Bs_TestCase::error() Bs_TestCase::fail() Bs_TestCase::failed() Bs_TestCase::getExceptions() Bs_TestCase::name() Bs_TestCase::run() Run a single TestCase in the context of this TestResult Bs_TestCase::runBare() Bs_TestCase::runTest() Bs_TestCase::setUp() Bs_TestCase::tearDown() Bs_TestCase::_createResult()
### Class Details [line 24] i think this is something for every serious php coder. if you're not absolutely sure what the getType(NULL) returns, if empty(NULL) is TRUE etc, and you are not, then this is something for you too. i made this class because a) php acts in ways we did not expect b) i'm pissed the code was originally written for php 4.0.5 now with php 4.1.1 there are a few behavoir changes (expected things). code is updated and comments are made. 2002/04/04 --andrej #### Tags:
version: | 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:17:48 $
author: | andrej arn <at blueshoes dot org> (maintener)
author: | Sam Blum <at blueshoes dot org>
[ Top ] ### Class Variables #### $array = array() [line 31]
Type: | mixed
[ Top ] #### $bool = FALSE [line 29]
Type: | mixed
[ Top ] #### $empty = '' [line 27]
Type: | mixed
[ Top ] #### $false = FALSE [line 44]
Type: | mixed
[ Top ] #### $int = 15 [line 39]
Type: | mixed
[ Top ] #### $intFalse = 0 [line 41]
Type: | mixed
[ Top ] #### $intNeg = -1 [line 42]
Type: | mixed
[ Top ] #### $intTrue = 1 [line 40]
Type: | mixed
[ Top ] #### $notSet = [line 30]
Type: | mixed
[ Top ] #### $null = NULL [line 28]
Type: | mixed
[ Top ] #### $string = 'hello' [line 33]
Type: | mixed
[ Top ] #### $stringFalse = 'false' [line 38]
Type: | mixed
[ Top ] #### $stringInt = '15' [line 34]
Type: | mixed
[ Top ] #### $stringNeg = '-1' [line 36]
Type: | mixed
[ Top ] #### $stringTrue = 'true' [line 37]
Type: | mixed
[ Top ] #### $stringZero = '0' [line 35]
Type: | mixed
[ Top ] #### $true = TRUE [line 43]
Type: | mixed
[ Top ] ### Class Methods ### constructor PhpSyntax_PhpUnit [line 47]
`PhpSyntax_PhpUnit PhpSyntax_PhpUnit( mixed $name)`
[ Top ] ### method __PhpSyntax_array_merge [line 238]
`void __PhpSyntax_array_merge( )`
[ Top ] ### method __PhpSyntax_compareOne_array [line 223]
`void __PhpSyntax_compareOne_array( )`
$x = (bool)($array); [ Top ] ### method __PhpSyntax_compareTwo_array [line 231]
`void __PhpSyntax_compareTwo_array( )`
$x = (array('foo') == array('foo')); [ Top ] ### method __PhpSyntax_dataTypeEmpty [line 57]
`void __PhpSyntax_dataTypeEmpty( )`
datatype of $empty? [ Top ] ### method __PhpSyntax_dataTypeNotSet [line 147]
`void __PhpSyntax_dataTypeNotSet( )`
datatype of $notSet? i have expected to get 'unknown type'. (andrej) [ Top ] ### method __PhpSyntax_dataTypeNull [line 102]
`void __PhpSyntax_dataTypeNull( )`
datatype of $null? i have expected to get 'unknown type'. (andrej) [ Top ] ### method __PhpSyntax_dataTypeReallyNotSet [line 156]
`void __PhpSyntax_dataTypeReallyNotSet( )`
additional check for a var that has never been metioned, not even as "var $x" in a class. i have expected to get 'unknown type'. (andrej) [ Top ] ### method __PhpSyntax_dataType_expression_compare [line 508]
`void __PhpSyntax_dataType_expression_compare( )`
[ Top ] ### method __PhpSyntax_dataType_expression_true [line 501]
`void __PhpSyntax_dataType_expression_true( )`
[ Top ] ### method __PhpSyntax_dataType_expression_true_double2_or [line 542]
`void __PhpSyntax_dataType_expression_true_double2_or( )`
[ Top ] ### method __PhpSyntax_dataType_expression_true_double2_stroke [line 533]
`void __PhpSyntax_dataType_expression_true_double2_stroke( )`
[ Top ] ### method __PhpSyntax_dataType_expression_true_double_ampersand [line 515]
`void __PhpSyntax_dataType_expression_true_double_ampersand( )`
[ Top ] ### method __PhpSyntax_dataType_expression_true_double_and [line 524]
`void __PhpSyntax_dataType_expression_true_double_and( )`
[ Top ] ### method __PhpSyntax_empty_array [line 199]
`void __PhpSyntax_empty_array( )`
$x = empty($array); [ Top ] ### method __PhpSyntax_empty_bool [line 253]
`void __PhpSyntax_empty_bool( )`
$x = empty($bool); [ Top ] ### method __PhpSyntax_empty_doubleequals_notSet [line 310]
`void __PhpSyntax_empty_doubleequals_notSet( )`
[ Top ] ### method __PhpSyntax_empty_doubleequals_null [line 303]
`void __PhpSyntax_empty_doubleequals_null( )`
[ Top ] ### method __PhpSyntax_empty_empty [line 65]
`void __PhpSyntax_empty_empty( )`
$x = empty($empty); [ Top ] ### method __PhpSyntax_empty_equals_notSet [line 289]
`void __PhpSyntax_empty_equals_notSet( )`
i would prefer to have FALSE returned. (andrej) [ Top ] ### method __PhpSyntax_empty_equals_null [line 281]
`void __PhpSyntax_empty_equals_null( )`
i would prefer to have FALSE returned. (andrej) [ Top ] ### method __PhpSyntax_empty_notSet [line 163]
`void __PhpSyntax_empty_notSet( )`
$x = empty($notSet); [ Top ] ### method __PhpSyntax_empty_null [line 110]
`void __PhpSyntax_empty_null( )`
$x = empty($null); [ Top ] ### method __PhpSyntax_hashKeys_0 [line 747]
`void __PhpSyntax_hashKeys_0( )`
this question is not in the phpSyntaxExam because it would be hard to ask the user for an input. if i make a multiple choise and give "f" as possible result, that is too much of a help. [ Top ] ### method __PhpSyntax_hashKeys_1 [line 756]
`void __PhpSyntax_hashKeys_1( )`
[ Top ] ### method __PhpSyntax_hashKeys_2 [line 765]
`void __PhpSyntax_hashKeys_2( )`
[ Top ] ### method __PhpSyntax_hashKeys_3 [line 774]
`void __PhpSyntax_hashKeys_3( )`
[ Top ] ### method __PhpSyntax_hashKeys_4 [line 783]
`void __PhpSyntax_hashKeys_4( )`
[ Top ] ### method __PhpSyntax_isSet_array [line 215]
`void __PhpSyntax_isSet_array( )`
$x = isSet($array); [ Top ] ### method __PhpSyntax_isSet_bool [line 269]
`void __PhpSyntax_isSet_bool( )`
$x = isSet($bool); [ Top ] ### method __PhpSyntax_isSet_empty [line 81]
`void __PhpSyntax_isSet_empty( )`
$x = isSet($empty); [ Top ] ### method __PhpSyntax_isSet_notSet [line 179]
`void __PhpSyntax_isSet_notSet( )`
$x = isSet($notSet); [ Top ] ### method __PhpSyntax_isSet_null [line 126]
`void __PhpSyntax_isSet_null( )`
$x = isSet($null); [ Top ] ### method __PhpSyntax_is_null_array [line 207]
`void __PhpSyntax_is_null_array( )`
$x = is_null($array); [ Top ] ### method __PhpSyntax_is_null_bool [line 261]
`void __PhpSyntax_is_null_bool( )`
$x = is_null($bool); [ Top ] ### method __PhpSyntax_is_null_empty [line 73]
`void __PhpSyntax_is_null_empty( )`
$x = is_null($empty); [ Top ] ### method __PhpSyntax_is_null_notSet [line 171]
`void __PhpSyntax_is_null_notSet( )`
$x = is_null($notSet); [ Top ] ### method __PhpSyntax_is_null_null [line 118]
`void __PhpSyntax_is_null_null( )`
$x = is_null($null); [ Top ] ### method __PhpSyntax_lousyBool_int [line 380]
`void __PhpSyntax_lousyBool_int( )`
[ Top ] ### method __PhpSyntax_lousyBool_intFalse [line 397]
`void __PhpSyntax_lousyBool_intFalse( )`
an expression like (0) uses to return false not true. because php treats <=0 as false and >=1 as true. i like this behavior. [ Top ] ### method __PhpSyntax_lousyBool_intNeg [line 404]
`void __PhpSyntax_lousyBool_intNeg( )`
[ Top ] ### method __PhpSyntax_lousyBool_intTrue [line 388]
`void __PhpSyntax_lousyBool_intTrue( )`
an expression like (1) uses to return true not false. [ Top ] ### method __PhpSyntax_lousyBool_string [line 329]
`void __PhpSyntax_lousyBool_string( )`
$x = (bool)("hello"); [ Top ] ### method __PhpSyntax_lousyBool_stringFalse [line 369]
`void __PhpSyntax_lousyBool_stringFalse( )`
$x = (bool)("false"); [ Top ] ### method __PhpSyntax_lousyBool_stringInt [line 337]
`void __PhpSyntax_lousyBool_stringInt( )`
$x = (bool)("15"); [ Top ] ### method __PhpSyntax_lousyBool_stringNeg [line 353]
`void __PhpSyntax_lousyBool_stringNeg( )`
$x = (bool)("-1"); [ Top ] ### method __PhpSyntax_lousyBool_stringTrue [line 361]
`void __PhpSyntax_lousyBool_stringTrue( )`
$x = (bool)("true"); [ Top ] ### method __PhpSyntax_lousyBool_stringZero [line 345]
`void __PhpSyntax_lousyBool_stringZero( )`
$x = (bool)("0"); [ Top ] ### method __PhpSyntax_lousyEquals_stringInt_int [line 416]
`void __PhpSyntax_lousyEquals_stringInt_int( )`
$x = (bool)("15" == 15); [ Top ] ### method __PhpSyntax_lousyEquals_string_int [line 433]
`void __PhpSyntax_lousyEquals_string_int( )`
$x = (bool)("hello" == 15); [ Top ] ### method __PhpSyntax_lousyEquals_string_intTrue [line 465]
`void __PhpSyntax_lousyEquals_string_intTrue( )`
$x = (bool)("hello" == 1); [ Top ] ### method __PhpSyntax_lousyEquals_string_stringTrue [line 449]
`void __PhpSyntax_lousyEquals_string_stringTrue( )`
$x = (bool)("hello" == "true"); [ Top ] ### method __PhpSyntax_lousyEquals_string_true [line 482]
`void __PhpSyntax_lousyEquals_string_true( )`
$x = (bool)("hello" == TRUE); [ Top ] ### method __PhpSyntax_null_doubleequals_notSet [line 317]
`void __PhpSyntax_null_doubleequals_notSet( )`
[ Top ] ### method __PhpSyntax_null_equals_notSet [line 296]
`void __PhpSyntax_null_equals_notSet( )`
[ Top ] ### method __PhpSyntax_prePostDeIncrement_1 [line 608]
`void __PhpSyntax_prePostDeIncrement_1( )`
[ Top ] ### method __PhpSyntax_prePostDeIncrement_2 [line 617]
`void __PhpSyntax_prePostDeIncrement_2( )`
[ Top ] ### method __PhpSyntax_prePostDeIncrement_11 [line 672]
`void __PhpSyntax_prePostDeIncrement_11( )`
[ Top ] ### method __PhpSyntax_prePostDeIncrement_12 [line 682]
`void __PhpSyntax_prePostDeIncrement_12( )`
[ Top ] ### method __PhpSyntax_reference_1 [line 555]
`void __PhpSyntax_reference_1( )`
[ Top ] ### method __PhpSyntax_reference_2 [line 567]
`void __PhpSyntax_reference_2( )`
[ Top ] ### method __PhpSyntax_reference_3 [line 580]
`void __PhpSyntax_reference_3( )`
[ Top ] ### method __PhpSyntax_reference_4 [line 592]
`void __PhpSyntax_reference_4( )`
[ Top ] ### method __PhpSyntax_strongEquals_stringInt_int [line 424]
`void __PhpSyntax_strongEquals_stringInt_int( )`
$x = (bool)("15" === 15); [ Top ] ### method __PhpSyntax_strongEquals_string_int [line 441]
`void __PhpSyntax_strongEquals_string_int( )`
$x = (bool)("hello" === 15); [ Top ] ### method __PhpSyntax_strongEquals_string_intTrue [line 473]
`void __PhpSyntax_strongEquals_string_intTrue( )`
$x = (bool)("hello" === 1); [ Top ] ### method __PhpSyntax_strongEquals_string_stringTrue [line 457]
`void __PhpSyntax_strongEquals_string_stringTrue( )`
$x = (bool)("hello" === "true"); [ Top ] ### method __PhpSyntax_strongEquals_string_true [line 490]
`void __PhpSyntax_strongEquals_string_true( )`
$x = (bool)("hello" === TRUE); [ Top ] ### method __PhpSyntax_toBool_empty [line 89]
`void __PhpSyntax_toBool_empty( )`
$x = (bool)$empty; [ Top ] ### method __PhpSyntax_toBool_notSet [line 187]
`void __PhpSyntax_toBool_notSet( )`
$x = (bool)($notSet); [ Top ] ### method __PhpSyntax_toBool_null [line 134]
`void __PhpSyntax_toBool_null( )`
$x = (bool)($null); [ Top ] Documentation generated on Mon, 29 Dec 2003 21:15:47 +0100 by phpDocumentor 1.2.3