test: add escape bracket.

Signed-off-by: ytetsuro <phper.0o0@gmail.com>
This commit is contained in:
ytetsuro 2018-09-15 02:18:33 +09:00
parent d4716726f5
commit a4f634354c
No known key found for this signature in database
GPG Key ID: 626F2181557E58A9

View File

@ -550,8 +550,8 @@ class ValidationTest extends \CIUnitTestCase
{
$method = $this->getPrivateMethodInvoker($this->validation, 'splitRules');
$result = $method('required|regex_match[/^[0-9]{4}[\-\.\/][0-9]{2}[\-\.\/][0-9]{2}/]|max_length[10]');
$result = $method('required|regex_match[/^[0-9]{4}[\-\.\[\/][0-9]{2}[\-\.\[\/][0-9]{2}/]|max_length[10]');
$this->assertEquals('regex_match[/^[0-9]{4}[\-\.\/][0-9]{2}[\-\.\/][0-9]{2}/]', $result[1]);
$this->assertEquals('regex_match[/^[0-9]{4}[\-\.\[\/][0-9]{2}[\-\.\[\/][0-9]{2}/]', $result[1]);
}
}