Project

General

Profile

Feature #20817 ยป 0011626.patch

Administrator Admin, 2009-08-02 16:09

View differences:

tests/t3lib/t3lib_matchcondition_testcase.php (Arbeitskopie)
$this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
}
/**
* Tests whether numerical comparison matches.
* @test
*/
public function conditionMatchesOnEqualExpression() {
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1]'));
}
/**
* Tests whether numerical comparison matches.
* @test
*/
public function conditionMatchesOnNotEqualExpression() {
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2]'));
}
/**
* Tests whether numerical comparison matches.
* @test
*/
public function conditionMatchesOnLowerThanExpression() {
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 < 20]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 < 10.2]'));
}
/**
* Tests whether numerical comparison matches.
* @test
*/
public function conditionMatchesOnLowerThanOrEqualExpression() {
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 10]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 20]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.1]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.2]'));
}
/**
* Tests whether numerical comparison matches.
* @test
*/
public function conditionMatchesOnGreaterThanExpression() {
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 > 10]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 > 10.1]'));
}
/**
* Tests whether numerical comparison matches.
* @test
*/
public function conditionMatchesOnGreaterThanOrEqualExpression() {
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 >= 10]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 >= 10]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 >= 10.1]'));
$this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 >= 10.1]'));
}
}
?>
    (1-1/1)