Changeset 44785 for trunk/tests/phpunit/tests/image/resize.php
- Timestamp:
- 03/01/2019 08:57:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/resize.php
r42343 r44785 30 30 $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.jpg', 25, 25 ); 31 31 32 $this->assertEquals( 'test-image-25x25.jpg', basename( $image ) );32 $this->assertEquals( 'test-image-25x25.jpg', wp_basename( $image ) ); 33 33 list($w, $h, $type) = getimagesize( $image ); 34 34 $this->assertEquals( 25, $w ); … … 46 46 } 47 47 48 $this->assertEquals( 'test-image-25x25.png', basename( $image ) );48 $this->assertEquals( 'test-image-25x25.png', wp_basename( $image ) ); 49 49 list($w, $h, $type) = getimagesize( $image ); 50 50 $this->assertEquals( 25, $w ); … … 62 62 } 63 63 64 $this->assertEquals( 'test-image-25x25.gif', basename( $image ) );64 $this->assertEquals( 'test-image-25x25.gif', wp_basename( $image ) ); 65 65 list($w, $h, $type) = getimagesize( $image ); 66 66 $this->assertEquals( 25, $w ); … … 82 82 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 96 ); 83 83 84 $this->assertEquals( '2007-06-17DSC_4173-64x96.jpg', basename( $image ) );84 $this->assertEquals( '2007-06-17DSC_4173-64x96.jpg', wp_basename( $image ) ); 85 85 list($w, $h, $type) = getimagesize( $image ); 86 86 $this->assertEquals( 64, $w ); … … 94 94 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 0 ); 95 95 96 $this->assertEquals( '2007-06-17DSC_4173-128x193.jpg', basename( $image ) );96 $this->assertEquals( '2007-06-17DSC_4173-128x193.jpg', wp_basename( $image ) ); 97 97 list($w, $h, $type) = getimagesize( $image ); 98 98 $this->assertEquals( 128, $w ); … … 106 106 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 0, 96 ); 107 107 108 $this->assertEquals( '2007-06-17DSC_4173-64x96.jpg', basename( $image ) );108 $this->assertEquals( '2007-06-17DSC_4173-64x96.jpg', wp_basename( $image ) ); 109 109 list($w, $h, $type) = getimagesize( $image ); 110 110 $this->assertEquals( 64, $w ); … … 118 118 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 150, true ); 119 119 120 $this->assertEquals( '2007-06-17DSC_4173-150x150.jpg', basename( $image ) );120 $this->assertEquals( '2007-06-17DSC_4173-150x150.jpg', wp_basename( $image ) ); 121 121 list($w, $h, $type) = getimagesize( $image ); 122 122 $this->assertEquals( 150, $w ); … … 130 130 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 100, true ); 131 131 132 $this->assertEquals( '2007-06-17DSC_4173-150x100.jpg', basename( $image ) );132 $this->assertEquals( '2007-06-17DSC_4173-150x100.jpg', wp_basename( $image ) ); 133 133 list($w, $h, $type) = getimagesize( $image ); 134 134 $this->assertEquals( 150, $w ); … … 142 142 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 50, 150, true ); 143 143 144 $this->assertEquals( '2007-06-17DSC_4173-50x150.jpg', basename( $image ) );144 $this->assertEquals( '2007-06-17DSC_4173-50x150.jpg', wp_basename( $image ) ); 145 145 list($w, $h, $type) = getimagesize( $image ); 146 146 $this->assertEquals( 50, $w );
Note: See TracChangeset
for help on using the changeset viewer.