aboutsummaryrefslogtreecommitdiffstats
path: root/lib/t
diff options
context:
space:
mode:
authorMarek Laane <bald@smail.ee>2014-10-12 10:54:11 +0300
committerMarek Laane <bald@smail.ee>2014-10-12 10:54:11 +0300
commita0b2d09125d7911656fe4cb286f20643c4432281 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /lib/t
parente32d8242187534c387106ff344201c42ff6afb44 (diff)
downloadwww-a0b2d09125d7911656fe4cb286f20643c4432281.tar
www-a0b2d09125d7911656fe4cb286f20643c4432281.tar.gz
www-a0b2d09125d7911656fe4cb286f20643c4432281.tar.bz2
www-a0b2d09125d7911656fe4cb286f20643c4432281.tar.xz
www-a0b2d09125d7911656fe4cb286f20643c4432281.zip
Updated Estonian translation
Diffstat (limited to 'lib/t')
-rw-r--r--lib/t/00_downloads.t40
-rw-r--r--lib/t/01_mga_geoip.t29
-rw-r--r--lib/t/02_downloads_definitions.t45
-rw-r--r--lib/t/03_lang_redirection.t13
4 files changed, 0 insertions, 127 deletions
diff --git a/lib/t/00_downloads.t b/lib/t/00_downloads.t
deleted file mode 100644
index f30f9bf51..000000000
--- a/lib/t/00_downloads.t
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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');
-}
-
diff --git a/lib/t/01_mga_geoip.t b/lib/t/01_mga_geoip.t
deleted file mode 100644
index aa3daa674..000000000
--- a/lib/t/01_mga_geoip.t
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-require_once realpath(__DIR__ . '/../testmore.php');
-require_once realpath(__DIR__ . '/../mga_geoip.php');
-
-plan('no_plan');
-
-diag('Testing mga_geoip_* functions against defined IP/locations.');
-
-$ips = array(
- '46.33.75.17'
- => array('DE', 'EU'),
-
- '2a01:e35:8a03:9990:223:dfff:fe7e:e7f0'
- => array('FR', 'EU'),
-
- '2a00:1450:8006::93'
- => array('IE', 'EU'),
-
- '173.194.67.99'
- => array('US', 'NA')
-);
-
-foreach ($ips as $ip => $cc) {
-
- $country = MGA_Geoip::mga_geoip_country_by_ip($ip, false);
- is($country, $cc[0], 'country match for ' . $ip);
- is(MGA_Geoip::mga_geoip_continent_by_country($country), $cc[1], 'continent match for ' . $ip);
-}
diff --git a/lib/t/02_downloads_definitions.t b/lib/t/02_downloads_definitions.t
deleted file mode 100644
index feb679092..000000000
--- a/lib/t/02_downloads_definitions.t
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-require realpath(__DIR__ . '/../testmore.php');
-require realpath(__DIR__ . '/../../en/downloads/get/lib.php');
-require realpath(__DIR__ . '/../Downloads.php');
-
-plan('no_plan');
-
-diag('Testing functions');
-
-$mirrors = get_mirrors_for('dummy', 'de', 'DE');
-
-
-$testProd = array(
- 'file' => 'file',
- 'path' => 'path',
- 'torrent' => 'torrent/path.torrent'
-);
-
-is('$MIRROR/path/file', get_download_link($testProd));
-
-
-diag('Testing downloads definitions.');
-
-
-$ini_file = realpath(__DIR__ . '/../../en/downloads/get/definitions.ini');
-$defs = parse_ini_file($ini_file, true);
-
-$keysRequired = array('path', 'file', 'name', 'size');
-$keysPreferred = array('sha1', 'md5');
-
-foreach ($defs as $prodKey => $values) {
- diag(sprintf('Testing config for %s', $prodKey));
- foreach ($keysRequired as $k)
- ok($values[$k], 'has ' . $k);
-
- foreach ($keysPreferred as $k) {
- if (!array_key_exists($k, $values)) {
- diag(sprintf('Beware, missing %s!', $k));
- }
- }
-
- is(sprintf('$MIRROR/%s/%s', $values['path'], $values['file']), get_download_link($values), 'download link ok');
-}
-
diff --git a/lib/t/03_lang_redirection.t b/lib/t/03_lang_redirection.t
deleted file mode 100644
index cb799c71b..000000000
--- a/lib/t/03_lang_redirection.t
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-require realpath(__DIR__ . '/../testmore.php');
-require realpath(__DIR__ . '/../../langs.inc.php');
-
-plan('no_plan');
-
-diag('Testing langs.inc.php functions.');
-
-
-is(relocate($langs, null, 'en', 'en'), '/en/');
-is(relocate($langs, null, 'en', 'pt-BR,pt;q=0.8,es;q=0.6,en-US;q=0.4,en;q=0.2'), '/pt-br/');
-