Skip to content
Snippets Groups Projects
Commit e4ab3ee8 authored by Joel Pittet's avatar Joel Pittet
Browse files

Fix failing tests

parent 7d83743c
No related branches found
No related tags found
No related merge requests found
......@@ -672,11 +672,15 @@ class FeedsWebTestCase extends DrupalWebTestCase {
*/
public function getNid($url) {
$matches = array();
preg_match('/node\/(\d+?)$/', $url, $matches);
$nid = $matches[1];
// Test for actual integerness.
$this->assertIdentical($nid, (string) (int) $nid);
$nid = NULL;
if (preg_match('/node\/(\d+?)$/', $url, $matches)) {
$nid = $matches[1];
// Test for actual integerness.
$this->assertIdentical($nid, (string) (int) $nid);
}
else {
$this->fail(t('URL did not contain nid: @url', array('@url' => $url)));
}
return $nid;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment