浏览代码

Basic testing for BLAST DB api.

Lacey Sanderson 6 年之前
父节点
当前提交
ca6c8d527f
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      tests/api/BlastDBApiTest.php

+ 12 - 0
tests/api/BlastDBApiTest.php

@@ -35,6 +35,8 @@ class BlastDBApiTest extends TripalTestCase {
 
   /**
    * Tests get_blast_database_options().
+   * @todo test for protein as well.
+   * @todo test with permissions.
    */
   public function testGetBlastDBOptions() {
 
@@ -57,5 +59,15 @@ class BlastDBApiTest extends TripalTestCase {
       $this->assertArrayHasKey($node->nid, $options,
         "Unable to find a specific node option that we know should be there.");
     }
+
+    // Also check get_blast_database_nodes() directly.
+    $retrieved_nodes = get_blast_database_nodes();
+    $this->assertGreaterThanOrEqual(3, sizeof($retrieved_nodes),
+      "Unable to retrieve the nodes at all.");
+    foreach ($nodes as $node) {
+      $this->assertArrayHasKey($node->nid, $retrieved_nodes,
+        "Unable to find a specific node option that we know should be there.");
+    }
+
   }
 }