mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 06:37:06 +00:00
Tests: Clean up skipping conditions and requirements for various tests.
This improves the consistency of test skipping and ensures that: * The `@requires` annotations use the right condition and format, and are on the right level (class vs. function). * Inline conditions with a `markTestSkipped()` call are only used when annotations cannot be used. * All `markTestSkipped()` calls contain a verbose explanation of why the test is being skipped. Props jrf, hellofromTonya. Fixes #53009. git-svn-id: https://develop.svn.wordpress.org/trunk@51415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -53,6 +53,8 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test resizing an image, not using crop
|
||||
*
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
public function test_resize() {
|
||||
$file = DIR_TESTDATA . '/images/waffles.jpg';
|
||||
@@ -73,6 +75,8 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test multi_resize with single image resize and no crop
|
||||
*
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
public function test_single_multi_resize() {
|
||||
$file = DIR_TESTDATA . '/images/waffles.jpg';
|
||||
@@ -183,6 +187,7 @@ class Tests_Image_Editor_GD extends WP_Image_UnitTestCase {
|
||||
* Test multi_resize with multiple sizes
|
||||
*
|
||||
* @ticket 26823
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
public function test_multi_resize() {
|
||||
$file = DIR_TESTDATA . '/images/waffles.jpg';
|
||||
|
||||
Reference in New Issue
Block a user