• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress develop tests

WordPress develop tests

WordPress develop tests a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Tests_Image_Dimensions::test_400x400_no_crop() –

You appear to be a bot. Output may be restricted

Description

Usage

Tests_Image_Dimensions::test_400x400_no_crop();

Parameters

Returns

void

Source

File name: wordpress-develop-tests/phpunit/tests/image/dimensions.php


Lines:

1 to 12 of 12
  public function test_400x400_no_crop() {
    // Landscape: resize 640x480 to fit 400x400: 400x300.
    $out = image_resize_dimensions( 640, 480, 400, 400, false );
    // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h.
    $this->assertSame( array( 0, 0, 0, 0, 400, 300, 640, 480 ), $out );

    // Portrait: resize 480x640 to fit 400x400: 300x400.
    $out = image_resize_dimensions( 480, 640, 400, 400, false );
    // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h.
    $this->assertSame( array( 0, 0, 0, 0, 300, 400, 480, 640 ), $out );
  }
 

 View on GitHub

Published: 26th November 2019 | Last updated: 20th March 2022

Primary Sidebar

Information

Function name: Tests_Image_Dimensions::test_400x400_no_crop
Class ref: Tests_Image_Dimensions
Plugin ref: WordPress develop tests
Version: 5.9.3
Sourcefile: phpunit/tests/image/dimensions.php
File ref: phpunit/tests/image/dimensions.php
Deprecated?: No
API Letters: #,D,I,T

Footer

WordPress develop tests
WordPress develop tests
WordPress develop tests a2z
WordPress 6.3.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  develop.wp-a2z.org
© Copyright WordPress develop tests 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites