diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-05-21 14:45:53 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-21 18:43:13 +0200 |
commit | 77198abd94437eb418f11957695986470b1afc9a (patch) | |
tree | 710b0285a00aa3f54db274ff01a9eb21017c2164 /application/test/tests/test_libraries_image.php | |
parent | eb9daf07b1a118b473d352c98c5822c3063e598d (diff) |
tests: Make prove --state work; Restructure tests
This moves all tests into a subdirectory and lets prove itself figure
out which tests exist. It seems if you supply the testlist via
arguments or stdin --state won't affect the order.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/test/tests/test_libraries_image.php')
-rw-r--r-- | application/test/tests/test_libraries_image.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/application/test/tests/test_libraries_image.php b/application/test/tests/test_libraries_image.php new file mode 100644 index 000000000..13c9e67b9 --- /dev/null +++ b/application/test/tests/test_libraries_image.php @@ -0,0 +1,38 @@ +<?php +/* + * Copyright 2015 Florian "Bluewind" Pritz <bluewind@server-speed.net> + * + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ + +namespace test\tests; + +class test_libraries_image extends \test\Test { + + public function __construct() + { + parent::__construct(); + } + + public function init() + { + } + + public function cleanup() + { + } + + public function test_type_supported_normalCase() + { + $this->t->is(\libraries\Image::type_supported('image/png'), true, 'image/png should be supported'); + $this->t->is(\libraries\Image::type_supported('image/jpeg'), true, 'image/jpeg should be supported'); + $this->t->is(\libraries\Image::type_supported('application/pdf'), true, 'application/pdf should be supported'); + + $this->t->is(\libraries\Image::type_supported('application/octet-stream'), false, 'application/octet-stream should not be supported'); + $this->t->is(\libraries\Image::type_supported('text/plain'), false, 'text/plain should not be supported'); + } + +} + |