summaryrefslogtreecommitdiffstats
path: root/application/tests/test_libraries_image.php
blob: fb34d794e201bb01868a7a2a5662fae84e58f8ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
 * Copyright 2015 Florian "Bluewind" Pritz <bluewind@server-speed.net>
 *
 * Licensed under AGPLv3
 * (see COPYING for full license text)
 *
 */

namespace tests;

class test_libraries_image extends 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');
	}

}