Changeset 27129 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 02/08/2014 12:40:15 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/media.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r27100 r27129 407 407 $this->assertEquals( $expected, $content ); 408 408 } 409 410 /** 411 * @ticket 26768 412 */ 413 function test_add_image_size() { 414 global $_wp_additional_image_sizes; 415 $this->assertArrayNotHasKey( 'test-size', $_wp_additional_image_sizes ); 416 add_image_size( 'test-size', 200, 600 ); 417 $this->assertArrayHasKey( 'test-size', $_wp_additional_image_sizes ); 418 $this->assertEquals( 200, $_wp_additional_image_sizes['test-size']['width'] ); 419 $this->assertEquals( 600, $_wp_additional_image_sizes['test-size']['height'] ); 420 } 421 422 /** 423 * @ticket 26768 424 */ 425 function test_remove_image_size() { 426 add_image_size( 'test-size', 200, 600 ); 427 $this->assertTrue( has_image_size( 'test-size' ) ); 428 remove_image_size( 'test-size' ); 429 $this->assertFalse( has_image_size( 'test-size' ) ); 430 } 431 432 /** 433 * @ticket 26951 434 */ 435 function test_has_image_size() { 436 add_image_size( 'test-size', 200, 600 ); 437 $this->assertTrue( has_image_size( 'test-size' ) ); 438 } 439 409 440 }
Note: See TracChangeset
for help on using the changeset viewer.