Neos\Fusion\Tests\Unit\Core\Parser\PatternTest::testSPLIT_PATTERN_VALUENUMBER PHP Method

testSPLIT_PATTERN_VALUENUMBER() public method

Checks the regular expression SPLIT_PATTERN_VALUENUMBER
    public function testSPLIT_PATTERN_VALUENUMBER()
    {
        $pattern = Parser::SPLIT_PATTERN_VALUENUMBER;
        $this->assertEquals(preg_match($pattern, ' 1'), 1, 'The SPLIT_PATTERN_VALUENUMBER pattern did not match a number with a space in front.');
        $this->assertEquals(preg_match($pattern, '12221'), 1, 'The SPLIT_PATTERN_VALUENUMBER pattern did not match the number 12221.');
        $this->assertEquals(preg_match($pattern, '-12'), 1, 'The SPLIT_PATTERN_VALUENUMBER pattern did not match a negative number.');
        $this->assertEquals(preg_match($pattern, ' -42'), 1, 'The SPLIT_PATTERN_VALUENUMBER pattern did not match a negative number with a space in front.');
        $this->assertEquals(preg_match($pattern, '-12.5'), 0, 'The SPLIT_PATTERN_VALUENUMBER pattern matched a negative float number.');
        $this->assertEquals(preg_match($pattern, '42.5'), 0, 'The SPLIT_PATTERN_VALUENUMBER pattern matched a positive float number.');
    }