Project

General

Profile

Bug #22853 » 14680_test.diff

Administrator Admin, 2010-06-10 01:26

View differences:

tests/t3lib/t3lib_matchcondition_testcase.php (working copy)
}
/**
* Tests whether the gneric fetching of variables works with the namespace 'TSFE'.
* Tests whether the generic fetching of variables works with the namespace 'TSFE' and "=" with commalist of id's.
* @test
*/
public function genericGetVariablesSucceedsWithNamespaceTSFEAndCommalistUsingEquals() {
for ($i = 1; $i < 10; $i++) {
$GLOBALS['TSFE']->id = 2;
$this->assertTrue($this->matchCondition->match('[globalVar = TSFE:id = 1,2,3,4,5,6,7,8,9]'));
}
}
/**
* Tests whether the generic fetching of variables works with the namespace 'TSFE' and "!=" with commalist of id's.
* @test
*/
public function genericGetVariablesSucceedsWithNamespaceTSFEAndCommalistUsingNotEquals() {
$GLOBALS['TSFE']->id = 2;
$this->assertTrue($this->matchCondition->match('[globalVar = TSFE:id != 1,3,4,5,6,7,8,9]'));
}
/**
* Tests whether the generic fetching of variables works with the namespace 'TSFE' and ">" with commalist of id's.
* @test
*/
public function genericGetVariablesSucceedsWithNamespaceTSFEAndCommalistUsingGreaterThan() {
$GLOBALS['TSFE']->id = 10;
$this->assertTrue($this->matchCondition->match('[globalVar = TSFE:id > 1,2,3,4,5,6,7,8,9]'));
}
/**
* Tests whether the generic fetching of variables works with the namespace 'TSFE'.
* @test
*/
public function genericGetVariablesSucceedsWithNamespaceTSFE() {
$GLOBALS['TSFE']->id = 1234567;
$GLOBALS['TSFE']->testSimpleObject = new stdClass();
(2-2/2)