Skip to content

Commit

Permalink
tests: used @phpextension
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 21, 2017
1 parent dadebf8 commit eb56385
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 45 deletions.
6 changes: 1 addition & 5 deletions tests/Utils/Image.alpha1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image alpha channel.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$rectangle = Image::fromBlank(100, 100, Image::rgb(255, 255, 255, 127));
$rectangle->filledRectangle(25, 25, 74, 74, Image::rgb(255, 0, 0, 63));

Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.alpha2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image alpha channel.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$image = Image::fromFile(__DIR__ . '/images/alpha1.png');
$image->place(Image::fromFile(__DIR__ . '/images/alpha2.png'), 0, 0, 100);
Assert::same(file_get_contents(__DIR__ . '/expected/Image.alpha2.100.png'), $image->toString(Image::PNG, 0));
Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.clone.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image cloning.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$original = Image::fromFile(__DIR__ . '/images/logo.gif');

$dolly = clone $original;
Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.drawing.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image drawing.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$size = 300;
$image = Image::fromBlank($size, $size);

Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.factories.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image factories.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


test(function () {
$image = Image::fromFile(__DIR__ . '/images/logo.gif', $format);
Assert::same(176, $image->getWidth());
Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.place.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image place image.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$rectangle = Image::fromBlank(50, 50, Image::rgb(255, 255, 255));

$image = Image::fromBlank(100, 100, Image::rgb(0, 0, 0));
Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.resize.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image crop, resize & flip.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$main = Image::fromFile(__DIR__ . '/images/logo.gif');


Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.save.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image save method exceptions.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$main = Image::fromFile(__DIR__ . '/images/alpha1.png');


Expand Down
6 changes: 1 addition & 5 deletions tests/Utils/Image.send.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Image send method exceptions.
* @phpExtension gd
*/

declare(strict_types=1);
Expand All @@ -13,11 +14,6 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


if (!extension_loaded('gd')) {
Tester\Environment::skip('Requires PHP extension GD.');
}


$main = Image::fromFile(__DIR__ . '/images/alpha1.png');


Expand Down
1 change: 1 addition & 0 deletions tests/Utils/Strings.compare().phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Strings::compare()
* @phpExtension mbstring
*/

declare(strict_types=1);
Expand Down
1 change: 1 addition & 0 deletions tests/Utils/Strings.convertCase.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* Test: Nette\Utils\Strings and lower, upper, firstLower, firstUpper, capitalize
* @phpExtension mbstring
*/

declare(strict_types=1);
Expand Down

0 comments on commit eb56385

Please sign in to comment.