diff options
author | Marek Laane <bald@smail.ee> | 2014-10-12 10:54:11 +0300 |
---|---|---|
committer | Marek Laane <bald@smail.ee> | 2014-10-12 10:54:11 +0300 |
commit | a0b2d09125d7911656fe4cb286f20643c4432281 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /lib/t/02_downloads_definitions.t | |
parent | e32d8242187534c387106ff344201c42ff6afb44 (diff) | |
download | www-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/02_downloads_definitions.t')
-rw-r--r-- | lib/t/02_downloads_definitions.t | 45 |
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'); -} - |