33 $this->helper = new \TYPO3\CMS\Form\Tests\Unit\Validation\Helper();
34 $this->subject = $this->getMock(
'TYPO3\\CMS\\Form\\Validation\\BetweenValidator', array(
'dummy'), array(),
'', FALSE);
39 '3 < 5 < 7' => array(array(3, 5, 7)),
40 '0 < 10 < 20' => array(array(0, 10, 20)),
41 '-10 < 0 < 10' => array(array(-10, 0, 10)),
42 '-20 < -10 < 0' => array(array(-20, -10, 0)),
43 '1 < 2 < 3' => array(array(1, 2, 3)),
44 '1 < 1.01 < 1.1' => array(array(1, 1.01, 1.1)),
50 '1 < 1 < 2' => array(array(1, 1, 2)),
51 '1 < 2 < 2' => array(array(1, 2, 2)),
52 '1.1 < 1.1 < 1.2' => array(array(1.1, 1.1, 1.2)),
53 '1.1 < 1.2 < 1.2' => array(array(1.1, 1.2, 1.2)),
54 '-10.1234 < -10.12340 < 10' => array(array(-10.1234, -10.12340, 10)),
55 '100 < 0 < -100' => array(array(100, 0, -100))
61 '1 ≤ 1 ≤ 1' => array(array(1,1,1)),
62 '-10.1234 ≤ -10.12340 ≤ 10' => array(array(-10.1234, -10.12340, 10)),
63 '-10.1234 ≤ -10 ≤ 10' => array(array(-10.1234, -10.12340, 10)),
69 '-10.1234 ≤ -10.12345 ≤ 10' => array(array(-10.1234, -10.12345, 10)),
70 '100 ≤ 0 ≤ -100' => array(array(100, 0, -100))
79 $this->subject->setMinimum($input[0]);
80 $this->subject->setMaximum($input[2]);
81 $this->subject->setFieldName(
'numericValue');
82 $requestHandlerMock = $this->helper->getRequestHandler(array(
83 'numericValue' => $input[1]
85 $this->subject->injectRequestHandler($requestHandlerMock);
88 $this->subject->isValid()
97 $this->subject->setMinimum($input[0]);
98 $this->subject->setMaximum($input[2]);
99 $this->subject->setFieldName(
'numericValue');
100 $this->subject->setInclusive(TRUE);
101 $requestHandlerMock = $this->helper->getRequestHandler(array(
102 'numericValue' => $input[1]
104 $this->subject->injectRequestHandler($requestHandlerMock);
107 $this->subject->isValid()
116 $this->subject->setMinimum($input[0]);
117 $this->subject->setMaximum($input[2]);
118 $this->subject->setFieldName(
'numericValue');
119 $requestHandlerMock = $this->helper->getRequestHandler(array(
120 'numericValue' => $input[1]
122 $this->subject->injectRequestHandler($requestHandlerMock);
125 $this->subject->isValid()
134 $this->subject->setMinimum($input[0]);
135 $this->subject->setMaximum($input[2]);
136 $this->subject->setFieldName(
'numericValue');
137 $this->subject->setInclusive(TRUE);
138 $requestHandlerMock = $this->helper->getRequestHandler(array(
139 'numericValue' => $input[1]
141 $this->subject->injectRequestHandler($requestHandlerMock);
144 $this->subject->isValid()