From 9eb72a8715d17aa06b6e03393ba9f19dc86231d5 Mon Sep 17 00:00:00 2001
From: Daniel Rios <dr2@sanger.ac.uk>
Date: Tue, 22 Jul 2008 09:54:37 +0000
Subject: [PATCH] tested 2 new methods: to get db_name for an external_db_id
 and fetch db_entries for a source (db_name)

---
 modules/t/dbEntries.t | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/t/dbEntries.t b/modules/t/dbEntries.t
index 7f14bcf0e7..f9aa349d07 100644
--- a/modules/t/dbEntries.t
+++ b/modules/t/dbEntries.t
@@ -3,7 +3,7 @@ use warnings;
 
 BEGIN { $| = 1;
 	use Test;
-	plan tests => 59;
+	plan tests => 61;
 }
 
 use Bio::EnsEMBL::Test::MultiTestDB;
@@ -408,7 +408,13 @@ ok(@$dbes == 1);
 $dbes = $gene->get_all_DBLinks(undef,"RUBBISH");
 ok(@$dbes == 0);
 
+# test fetch_all_by_source
 
+$xrefs = $dbEntryAdaptor->fetch_all_by_source("%Uniprot%");
+ok(@{$xrefs} == 23);  #test 60
+
+my $db_name = $dbEntryAdaptor->get_db_name_from_external_db_id(4100);
+ok($db_name eq 'UniGene');
 
 sub print_dbEntries {
   my $dbes = shift;
-- 
GitLab