Пример #1
0
	/**
	 * Setup test fixture
	 */
	public function setup() {
		require_once( ABSPATH . WPINC . '/class-wp-image-editor.php' );

		include_once( DIR_TESTDATA . '/../includes/mock-image-editor.php' );

		parent::setUp();
	}
 public function tearDown()
 {
     $folder = DIR_TESTDATA . '/images/waffles-*.jpg';
     foreach (glob($folder) as $file) {
         unlink($file);
     }
     $this->remove_added_uploads();
     parent::tearDown();
 }
	public function shutDown() {
		$folder = DIR_TESTDATA . '/images/waffles-*.jpg';

		foreach ( glob( $folder ) as $file ) {
			unlink( $file );
		}

		parent::shutDown();
	}
	public function setup() {
		require_once( ABSPATH . WPINC . '/class-wp-image-editor.php' );
		require_once( ABSPATH . WPINC . '/class-wp-image-editor-imagick.php' );

		$editor = new WP_Image_Editor_Imagick( null );

		if ( ! $editor->test() )
			$this->markTestSkipped( 'Image Magick not available' );

		parent::setUp();
	}
Пример #5
0
 public function tearDown()
 {
     remove_filter('wp_image_editors', array($this, 'wp_image_editors'));
     parent::tearDown();
 }
	public function setup() {
		require_once( ABSPATH . WPINC . '/class-wp-image-editor.php' );
		require_once( ABSPATH . WPINC . '/class-wp-image-editor-gd.php' );
		parent::setUp();
	}