diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-26 11:55:43 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-28 17:49:21 +0200 |
commit | 23a4e17bd12e803bb1806cd32cbac9e855acc614 (patch) | |
tree | 19094250c5cf69fe58634e4dcc8e10135c29a897 /tests | |
parent | 36317896513ce229938d3cba96d32db19d2510d2 (diff) | |
download | nextcloud-server-23a4e17bd12e803bb1806cd32cbac9e855acc614.tar.gz nextcloud-server-23a4e17bd12e803bb1806cd32cbac9e855acc614.zip |
Revert "Do not run image tests on php8"
This reverts commit d690f909284ae4bb4dee7d00318104ee76720bfa.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/ImageTest.php | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php index ebf00392d87..5b83c4ac57f 100644 --- a/tests/lib/ImageTest.php +++ b/tests/lib/ImageTest.php @@ -20,10 +20,6 @@ class ImageTest extends \Test\TestCase { } public function testConstructDestruct() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertInstanceOf('\OC_Image', $img); @@ -51,10 +47,6 @@ class ImageTest extends \Test\TestCase { } public function testValid() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertTrue($img->valid()); @@ -69,10 +61,6 @@ class ImageTest extends \Test\TestCase { } public function testMimeType() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertEquals('image/png', $img->mimeType()); @@ -90,10 +78,6 @@ class ImageTest extends \Test\TestCase { } public function testWidth() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertEquals(128, $img->width()); @@ -111,10 +95,6 @@ class ImageTest extends \Test\TestCase { } public function testHeight() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertEquals(128, $img->height()); @@ -132,10 +112,6 @@ class ImageTest extends \Test\TestCase { } public function testSave() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $img->resize(16); @@ -150,10 +126,6 @@ class ImageTest extends \Test\TestCase { } public function testData() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $raw = imagecreatefromstring(file_get_contents(OC::$SERVERROOT.'/tests/data/testimage.png')); @@ -188,10 +160,6 @@ class ImageTest extends \Test\TestCase { } public function testDataNoResource() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $this->assertNull($img->data()); } @@ -200,10 +168,6 @@ class ImageTest extends \Test\TestCase { * @depends testData */ public function testToString() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $expected = base64_encode($img->data()); @@ -221,10 +185,6 @@ class ImageTest extends \Test\TestCase { } public function testResize() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertTrue($img->resize(32)); @@ -245,10 +205,6 @@ class ImageTest extends \Test\TestCase { } public function testPreciseResize() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertTrue($img->preciseResize(128, 512)); @@ -269,10 +225,6 @@ class ImageTest extends \Test\TestCase { } public function testCenterCrop() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $img->centerCrop(); @@ -293,10 +245,6 @@ class ImageTest extends \Test\TestCase { } public function testCrop() { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $this->assertTrue($img->crop(0, 0, 50, 20)); @@ -332,10 +280,6 @@ class ImageTest extends \Test\TestCase { * @param int[] $expected */ public function testFitIn($filename, $asked, $expected) { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT . '/tests/data/' . $filename); $this->assertTrue($img->fitIn($asked[0], $asked[1])); @@ -359,10 +303,6 @@ class ImageTest extends \Test\TestCase { * @param string $filename */ public function testScaleDownToFitWhenSmallerAlready($filename) { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/' . $filename); $currentWidth = $img->width(); @@ -396,10 +336,6 @@ class ImageTest extends \Test\TestCase { * @param int[] $expected */ public function testScaleDownWhenBigger($filename, $asked, $expected) { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/' . $filename); //$this->assertTrue($img->scaleDownToFit($asked[0], $asked[1])); @@ -420,10 +356,6 @@ class ImageTest extends \Test\TestCase { * @dataProvider convertDataProvider */ public function testConvert($mimeType) { - if (PHP_MAJOR_VERSION > 7) { - $this->markTestSkipped('Only run on php7'); - } - $img = new \OC_Image(); $img->loadFromFile(OC::$SERVERROOT.'/tests/data/testimage.png'); $tempFile = tempnam(sys_get_temp_dir(), 'img-test'); |