| 367 | |
| 368 | /** |
| 369 | * @ticket 26768 |
| 370 | */ |
| 371 | function test_add_image_size() { |
| 372 | global $_wp_additional_image_sizes; |
| 373 | add_image_size( 'test-size', 200, 600 ); |
| 374 | $this->assertArrayHasKey( 'test-size', $_wp_additional_image_sizes ); |
| 375 | $this->assertEquals( 200, $_wp_additional_image_sizes[ 'test-size' ]['width'] ); |
| 376 | $this->assertEquals( 600, $_wp_additional_image_sizes[ 'test-size' ]['height'] ); |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * @ticket 26768 |
| 381 | */ |
| 382 | function test_remove_image_size() { |
| 383 | add_image_size( 'test-size', 200, 600 ); |
| 384 | $this->assertTrue( has_image_size( 'test-size' ) ); |
| 385 | remove_image_size( 'test-size' ); |
| 386 | $this->assertFalse( has_image_size( 'test-size' ) ); |
| 387 | } |
| 388 | |
| 389 | /** |
| 390 | * @ticket 26951 |
| 391 | */ |
| 392 | function test_has_image_size() { |
| 393 | add_image_size( 'test-size', 200, 600 ); |
| 394 | $this->assertTrue( has_image_size( 'test-size' ) ); |
| 395 | } |
| 396 | |