コード例 #1
0
ファイル: BoneRegexTest.php プロジェクト: delboy1978uk/bone
 public function testSetPattern()
 {
     $regex = new Regex('we will replace this non-regex nonsense');
     $regex->setPattern('^\\/(?<controller>[^\\/]+)\\/(?<action>[^\\/]+)\\/(?<varvalpairs>(?:[^\\/]+\\/[^\\/]+\\/?)*)');
     $this->assertEquals('^\\/(?<controller>[^\\/]+)\\/(?<action>[^\\/]+)\\/(?<varvalpairs>(?:[^\\/]+\\/[^\\/]+\\/?)*)', $regex->getPattern());
 }