diff --git a/linkchecker.test b/linkchecker.test
index 3f054fd..5fe3537 100755
--- a/linkchecker.test
+++ b/linkchecker.test
@@ -17,11 +17,13 @@ class LinkCheckerLinkExtractionTest extends DrupalWebTestCase {
   public function setUp() {
     parent::setUp('linkchecker', 'path');
 
+    $full_html_format = filter_format_load('full_html');
     $permissions = array(
       'create page content',
       'edit own page content',
       'administer url aliases',
       'create url aliases',
+       filter_permission_name($full_html_format),
     );
 
     $user = $this->drupalCreateUser($permissions);
@@ -178,18 +180,12 @@ EOT;
     $folder1 = $this->randomName(10);
     $folder2 = $this->randomName(5);
 
-    // Allow the user to use the 'Full HTML' format.
-    db_update('filter_format')
-      ->condition('format', 2)
-      ->fields(array('roles' => ',2,'))
-      ->execute();
-
     // Fill node array.
     $edit = array();
     $edit['title'] = $this->randomName(32);
-    $edit['body'] = $body;
-    $edit['path'] = $folder1 . '/' . $folder2;
-    $edit['format'] = 2;
+    $edit['body[und][0][value]'] = $body;
+    $edit['path[alias]'] = $folder1 . '/' . $folder2;
+    $edit['body[und][0][format]'] = 'full_html';
 
     // Extract only full qualified URLs.
     variable_set('linkchecker_fqdn_only', 1);
@@ -197,12 +193,12 @@ EOT;
     // Verify path input field appears on add "Basic page" form.
     $this->drupalGet('node/add/page');
     // Verify path input is present.
-    $this->assertFieldByName('path', '', t('Path input field present on add Basic page form.'));
+    $this->assertFieldByName('path[alias]', '', t('Path input field present on add Basic page form.'));
 
     // Save node.
     $this->drupalPost('node/add/page', $edit, t('Save'));
-    $this->assertRaw(t('@type %title has been created.', array('@type' => 'Page', '%title' => $edit['title'])), t('Node was created.'));
-
+    $this->assertRaw(t('@type %title has been created.', array('@type' => 'Basic page', '%title' => $edit['title'])), t('Node was created.'));
+  
     // Verify if the content links are extracted correctly.
     $urls_fqdn = array(
       'http://www.lagrandeepicerie.fr/#e-boutique/Les_produits_du_moment,2/coffret_vins_doux_naturels,149',
@@ -253,18 +249,9 @@ EOT;
     $node = $this->drupalGetNodeByTitle($edit['title']);
     $this->assertTrue($node, t('Node found in database.'));
     $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $this->assertRaw(t('@type %title has been updated.', array('@type' => 'Page', '%title' => $edit['title'])));
+    $this->assertRaw(t('@type %title has been updated.', array('@type' => 'Basic page', '%title' => $edit['title'])));
 
-    // FIXME: Path alias seems not saved!???
-    //$this->assertIdentical($node->path, $edit['path'], t('URL alias "@node-path" matches path "@edit-path".', array('@node-path' => $node->path, '@edit-path' => $edit['path'])));
-
-    // DEBUG
-    $linkchecker_links = db_query("SELECT * FROM {linkchecker_link}");
-    foreach ($result as $row) {
-      $rows[] = $row->url;
-    }
-    $this->verbose(theme_item_list($rows, 'URLs in database:'));
-    //$this->fail('DEBUG: ' .implode('<br />', $rows));
+    $this->drupalGet($edit['path[alias]']);
 
     // Verify if the content links are extracted correctly.
     global $base_root, $base_path;
@@ -284,7 +271,7 @@ EOT;
       'flvplayer2.swf' => $base_root . $base_path . $folder1 . '/flvplayer2.swf',
       'foo.ogg' => $base_root . $base_path . $folder1 . '/foo.ogg',
     );
-    $this->verbose(theme_item_list($urls_relative, 'Verify if following relative URLs exists:'));
+    $this->verbose(theme_item_list(array('items' => $urls_relative, 'title' => 'Verify if following relative URLs exists:' , 'attributes' => array(), 'type' => 'ul')));
 
     foreach ($urls_relative as $org_url => $check_url) {
       $link = $this->getLinkCheckerLink($check_url);
@@ -366,13 +353,13 @@ EOT;
    *   Link object.
    */
   function getLinkCheckerLink($url) {
-    return db_query('SELECT * FROM {linkchecker_link} WHERE urlhash = :urlhash', array(':urlhash' => drupal_hash_base64($url)));
+     return db_query('SELECT * FROM {linkchecker_link} WHERE urlhash = :urlhash', array(':urlhash' => drupal_hash_base64($url)))->fetchObject();
   }
 
   /**
    * Get the current number of links in linkchecker_links table.
    */
   function getLinkCheckerLinksCount() {
-    return db_result(db_query('SELECT COUNT(1) FROM {linkchecker_link}'));
+    return db_query('SELECT COUNT(1) FROM {linkchecker_link}')->fetchField();
   }
 }
