diff options
author | Thomas Backlund <tmb@mageia.org> | 2014-10-12 12:27:45 +0300 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2014-10-12 12:27:45 +0300 |
commit | 9ce6d646ff718cd62f6434c9a4c94e450436612a (patch) | |
tree | 3ee82e5db7c0aee44a5573d9d17035c6ecac697d /lib/t/00_downloads.t | |
parent | a0b2d09125d7911656fe4cb286f20643c4432281 (diff) | |
download | www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.gz www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.bz2 www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.xz www-9ce6d646ff718cd62f6434c9a4c94e450436612a.zip |
Revert "Updated Estonian translation"
This reverts commit a0b2d09125d7911656fe4cb286f20643c4432281.
Diffstat (limited to 'lib/t/00_downloads.t')
-rw-r--r-- | lib/t/00_downloads.t | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/t/00_downloads.t b/lib/t/00_downloads.t new file mode 100644 index 000000000..f30f9bf51 --- /dev/null +++ b/lib/t/00_downloads.t @@ -0,0 +1,40 @@ +<?php + + +require realpath(__DIR__ . '/../testmore.php'); +require realpath(__DIR__ . '/../Downloads.php'); + +plan('no_plan'); + +diag('Testing prepare_download(). Countries/continents should match.'); + +$wsd = new Downloads(); + +$countries = array( + 'FR' => array('FR', 'EU'), + 'DE' => array('DE', 'EU'), + 'AU' => array('AU', 'OC') +); + +foreach ($countries as $k => $v) { + $one = $wsd->prepare_download(true, $k); + + //is($one['country'], $v[0], "countries match"); + is($one['continent'], $v[1], "continents match"); +} + +diag('Testing get_mirror(). Note, this depends on the actual mirrors list.'); + +$ccs = array( + array('FR', 'EU'), + array('DE', 'EU'), + array('CN', 'AS') +); + +foreach ($ccs as $cc) { + $mir = $wsd->get_mirror($cc[0], $cc[1]); + + //is($mir['country'], $cc[0], 'country match'); + is($mir['continent'], $cc[1], 'continents match'); +} + |