aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-20 20:50:18 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-02-20 20:50:18 +0100
commit275d6bec6aa97dbe402a6f5d9791c04ffbd24152 (patch)
treef770df1a931b107c68378c468d7e4b3ee8bd8078 /tests
parent61fa9dcb9ffb7654b9112607ae82724422781e33 (diff)
parent5e215aef2611120c565c5717490b674ff96b0e22 (diff)
downloadforums-275d6bec6aa97dbe402a6f5d9791c04ffbd24152.tar
forums-275d6bec6aa97dbe402a6f5d9791c04ffbd24152.tar.gz
forums-275d6bec6aa97dbe402a6f5d9791c04ffbd24152.tar.bz2
forums-275d6bec6aa97dbe402a6f5d9791c04ffbd24152.tar.xz
forums-275d6bec6aa97dbe402a6f5d9791c04ffbd24152.zip
Merge branch '3.1.x'
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/download_test.php15
-rw-r--r--tests/upload/filespec_test.php5
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
index 4e4995c21e..1e863210e6 100644
--- a/tests/functional/download_test.php
+++ b/tests/functional/download_test.php
@@ -66,6 +66,11 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
public function test_download_accessible()
{
+ if (!class_exists('finfo'))
+ {
+ $this->markTestSkipped('Unable to run test with fileinfo disabled');
+ }
+
$this->load_ids(array(
'forums' => array(
'Download #1',
@@ -118,6 +123,11 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
public function test_download_softdeleted_post()
{
+ if (!class_exists('finfo'))
+ {
+ $this->markTestSkipped('Unable to run test with fileinfo disabled');
+ }
+
$this->load_ids(array(
'forums' => array(
'Download #1',
@@ -180,6 +190,11 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
public function test_download_softdeleted_topic()
{
+ if (!class_exists('finfo'))
+ {
+ $this->markTestSkipped('Unable to run test with fileinfo disabled');
+ }
+
$this->load_ids(array(
'forums' => array(
'Download #1',
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index d8fa82e2b5..05547dcd00 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -266,6 +266,11 @@ class phpbb_filespec_test extends phpbb_test_case
*/
public function test_is_image_get_mimetype($filename, $mimetype, $expected)
{
+ if (!class_exists('finfo') && strtolower(substr(PHP_OS, 0, 3)) === 'win')
+ {
+ $this->markTestSkipped('Unable to test mimetype guessing without fileinfo support on Windows');
+ }
+
$filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename, 'type' => $mimetype));
$filespec->get_mimetype($this->path . $filename);
$this->assertEquals($expected, $filespec->is_image());