Neos\Fusion\Tests\Unit\Core\Parser\PatternTest::testSCAN_PATTERN_CLOSINGCONFINEMENT PHP 메소드

testSCAN_PATTERN_CLOSINGCONFINEMENT() 공개 메소드

    public function testSCAN_PATTERN_CLOSINGCONFINEMENT()
    {
        $pattern = Parser::SCAN_PATTERN_CLOSINGCONFINEMENT;
        $this->assertEquals(preg_match($pattern, '}'), 1, 'a closing confinement was not matched');
        $this->assertEquals(preg_match($pattern, '		  }'), 1, 'a closing confinement with leading whitespace was not matched');
        $this->assertEquals(preg_match($pattern, '		  }     '), 1, 'a closing confinement with leading and following whitespace was not matched');
        $this->assertEquals(preg_match($pattern, '		  }    assas '), 0, 'a closing confinement with following text was matched, although it should not.');
    }