mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root. see #25088. git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
43
tests/phpunit/includes/mock-image-editor.php
Normal file
43
tests/phpunit/includes/mock-image-editor.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (class_exists( 'WP_Image_Editor' ) ) :
|
||||
|
||||
class WP_Image_Editor_Mock extends WP_Image_Editor {
|
||||
|
||||
public static $load_return = true;
|
||||
public static $test_return = true;
|
||||
public static $save_return = array();
|
||||
|
||||
public function load() {
|
||||
return self::$load_return;
|
||||
}
|
||||
public static function test() {
|
||||
return self::$test_return;
|
||||
}
|
||||
public static function supports_mime_type( $mime_type ) {
|
||||
return true;
|
||||
}
|
||||
public function resize( $max_w, $max_h, $crop = false ) {
|
||||
|
||||
}
|
||||
public function multi_resize( $sizes ) {
|
||||
|
||||
}
|
||||
public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
|
||||
|
||||
}
|
||||
public function rotate( $angle ) {
|
||||
|
||||
}
|
||||
public function flip( $horz, $vert ) {
|
||||
|
||||
}
|
||||
public function save( $destfilename = null, $mime_type = null ) {
|
||||
return self::$save_return;
|
||||
}
|
||||
public function stream( $mime_type = null ) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
Reference in New Issue
Block a user