Updated test RegEx for AYAH

Seems the format being returned doesn't start with ip... updated RegEx to check
for a 45 character alphanumeric instead of ip + 43 character alpha numeric
This commit is contained in:
Joshua Sherman 2014-04-20 18:41:01 -04:00
parent fa59eddae0
commit 2763818e49

View file

@ -28,7 +28,7 @@ class API_AYAHTest extends PHPUnit_Framework_TestCase
'scoring_key' => '80cc3f9c6e1da29369c238d55bd8528a968473ad', 'scoring_key' => '80cc3f9c6e1da29369c238d55bd8528a968473ad',
]; ];
$this->assertRegExp('/<div id=\'AYAH\'><\/div><script src=\'https:\/\/ws.areyouahuman.com\/ws\/script\/[a-z0-9]{40}\/ip[a-zA-Z0-9]{43}\' type=\'text\/javascript\' language=\'JavaScript\'><\/script>/', API_AYAH::getHTML()); $this->assertRegExp('/<div id=\'AYAH\'><\/div><script src=\'https:\/\/ws.areyouahuman.com\/ws\/script\/[a-z0-9]{40}\/[a-zA-Z0-9]{45}\' type=\'text\/javascript\' language=\'JavaScript\'><\/script>/', API_AYAH::getHTML());
} }
public function testIsNotHuman() public function testIsNotHuman()