Bug #21310 ยป 0012279_v2.patch
tests/t3lib/t3lib_matchcondition_testcase.php (Arbeitskopie) | ||
---|---|---|
}
|
||
/**
|
||
* Tests whether numerical comparison matches.
|
||
* @test
|
||
*/
|
||
public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {
|
||
$testKey = uniqid('test');
|
||
$this->assertTrue($this->matchCondition->match('[globalVar = GP:' . $testKey . '=]'));
|
||
$this->assertTrue($this->matchCondition->match('[globalVar = GP:' . $testKey . ' = ]'));
|
||
}
|
||
/**
|
||
* Tests whether numerical comparison matches.
|
||
* @test
|
||
*/
|
||
public function globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero() {
|
||
$testKey = uniqid('test');
|
||
$_GET = array();
|
||
$_POST = array($testKey => 0);
|
||
$this->assertFalse($this->matchCondition->match('[globalVar = GP:' . $testKey . '=]'));
|
||
$this->assertFalse($this->matchCondition->match('[globalVar = GP:' . $testKey . ' = ]'));
|
||
}
|
||
/**
|
||
* Tests whether string comparison matches.
|
||
* @test
|
||
*/
|