25 $this->assertEquals($start, $expr->getRegex()->hasStartFlag());
26 $this->assertEquals($end, $expr->getRegex()->hasEndFlag());
36 $this->assertEquals($start, $expr->getRegex()->hasStartJoker());
37 $this->assertEquals($end, $expr->getRegex()->hasEndJoker());
46 $expr->getRegex()->setStartFlag($start)->setEndFlag($end);
48 $this->assertEquals($expected, $expr->render());
57 $expr->getRegex()->setStartJoker($start)->setEndJoker($end);
59 $this->assertEquals($expected, $expr->render());
65 $expr->getRegex()->removeOption(
'i')->addOption(
'm');
67 $this->assertEquals(
'~abc~sm', $expr->render());
74 $expr->getRegex()->setStartFlag(
false)->setEndFlag(
false)->setStartJoker(
false)->setEndJoker(
false);
75 $this->assertEquals(
'~abc~is', $expr->render());
77 $expr->getRegex()->setStartFlag(
true)->setEndFlag(
true)->setStartJoker(
true)->setEndJoker(
true);
78 $this->assertEquals(
'~^.*abc.*$~is', $expr->render());
87 $expr = $expr->getRegex()->replaceJokers(
'@');
89 $this->assertEquals($expected, $expr->renderPattern());
95 array(
'~^abc~',
true,
false),
96 array(
'~abc$~',
false,
true),
97 array(
'~abc~',
false,
false),
98 array(
'~^abc$~',
true,
true),
99 array(
'~^abc\\$~',
true,
false),
106 array(
'~.*abc~',
true,
false),
107 array(
'~abc.*~',
false,
true),
108 array(
'~abc~',
false,
false),
109 array(
'~.*abc.*~',
true,
true),
110 array(
'~.*abc\\.*~',
true,
false),
117 array(
'~abc~',
true,
false,
'~^abc~'),
118 array(
'~abc~',
false,
true,
'~abc$~'),
119 array(
'~abc~',
false,
false,
'~abc~'),
120 array(
'~abc~',
true,
true,
'~^abc$~'),
127 array(
'~abc~',
true,
false,
'~.*abc~'),
128 array(
'~abc~',
false,
true,
'~abc.*~'),
129 array(
'~abc~',
false,
false,
'~abc~'),
130 array(
'~abc~',
true,
true,
'~.*abc.*~'),
137 array(
'~.abc~',
'@abc'),
138 array(
'~\\.abc~',
'\\.abc'),
139 array(
'~\\\\.abc~',
'\\\\@abc'),
140 array(
'~\\\\\\.abc~',
'\\\\\\.abc'),