Skip to content

Commit fc48818

Browse files
committed
Test message: Imagick is not installed
1 parent 3e99aa1 commit fc48818

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

library/Common/Config/env.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Environments helpers from Laravel Framework
4-
if ( ! function_exists('value'))
4+
if (!function_exists('value'))
55
{
66
/**
77
* Return the default value of the given value.
@@ -14,7 +14,7 @@ function value($value)
1414
return $value instanceof Closure ? $value() : $value;
1515
}
1616
}
17-
if ( ! function_exists('env'))
17+
if (!function_exists('env'))
1818
{
1919
/**
2020
* Gets the value of an environment variable. Supports boolean, empty and null.
@@ -27,7 +27,9 @@ function env($key, $default = null)
2727
{
2828
$value = getenv($key);
2929

30-
if ($value === false) return value($default);
30+
if ($value === false) {
31+
return value($default);
32+
}
3133

3234
switch (strtolower($value))
3335
{

test/StaticusTest/Actions/Fractal/AcceptanceTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ public function testPostRecreate()
178178

179179
public function testPostRecreateWithCrop()
180180
{
181+
if (!class_exists(\Imagick::class)) {
182+
$this->markTestSkipped('Imagick is not installed');
183+
}
181184
$imagePath = $this->dataDir . static::FILE_PATH_V0_SIZE;
182185
if (file_exists($imagePath)) {
183186
unlink($imagePath);

0 commit comments

Comments
 (0)