I am writing a PHP simpletest webtestcase. The following assert does not work.
$this->assertPattern('"serverTime":\d+');
for the page response
Blah Bla "serverTime":1447147314 ,Bla Bla
However when I test the regex in an online tool it works. I need to assert that the response contains a string "serverTime":<10digitnumber>
The function syntax is
assertPattern($regexp, $x).That means: fail, unless the regex
$regexpmatches$x.The regexp you are looking for is:
#\"serverTime\":(\d+){10}#.The whole function for SimpleTest: