aboutsummaryrefslogtreecommitdiffstats
path: root/lib/t/02_downloads_definitions.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/t/02_downloads_definitions.t')
-rw-r--r--lib/t/02_downloads_definitions.t45
1 files changed, 0 insertions, 45 deletions
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');
-}
-