summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-07-31 16:36:29 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-07-31 16:55:39 +0200
commit5f4502eda147fc1ffb61415da1d7f38f7c19aa6b (patch)
tree0091809605c0d12692945d17d5677f450d98c3d0 /application
parentcf7fc454ec1789603b360d69db83faf49b1e3ef1 (diff)
Silence some untestable coverage warnings in the test cases
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/test/tests/test_libraries_image.php2
-rw-r--r--application/test/tests/test_service_files.php4
2 files changed, 6 insertions, 0 deletions
diff --git a/application/test/tests/test_libraries_image.php b/application/test/tests/test_libraries_image.php
index cd9098ccc..2b1c20f9c 100644
--- a/application/test/tests/test_libraries_image.php
+++ b/application/test/tests/test_libraries_image.php
@@ -60,7 +60,9 @@ class test_libraries_image extends \test\Test {
$correct_error = $e->get_error_id() == "libraries/Image/unsupported-image-type";
$this->t->ok($correct_error, "Should get exception");
if (!$correct_error) {
+ // @codeCoverageIgnoreStart
throw $e;
+ // @codeCoverageIgnoreEnd
}
}
}
diff --git a/application/test/tests/test_service_files.php b/application/test/tests/test_service_files.php
index 401ddbe86..b9d6fce66 100644
--- a/application/test/tests/test_service_files.php
+++ b/application/test/tests/test_service_files.php
@@ -26,7 +26,9 @@ class test_service_files extends \test\Test {
$a = array();
try {
\service\files::verify_uploaded_files($a);
+ // @codeCoverageIgnoreStart
$this->t->fail("verify should error");
+ // @codeCoverageIgnoreEnd
} catch (\exceptions\UserInputException $e) {
$this->t->is($e->get_error_id(), "file/no-file", "verify should error");
}
@@ -66,7 +68,9 @@ class test_service_files extends \test\Test {
try {
\service\files::verify_uploaded_files($a);
+ // @codeCoverageIgnoreStart
$this->t->fail("verify should error");
+ // @codeCoverageIgnoreEnd
} catch (\exceptions\UserInputException $e) {
$data = $e->get_data();
$this->t->is($e->get_error_id(), "file/upload-verify", "verify should error");