Make WordPress Core

Ticket #43046: 43046-unittests.diff

File 43046-unittests.diff, 836 bytes (added by andizer, 6 years ago)

Added two simple tests

  • tests/phpunit/tests/media.php

     
    10411041        }
    10421042
    10431043        /**
     1044         * Tests the situation for a default image size that shouldn't be checked as well.
     1045         * @ticket 43046
     1046         */
     1047        public function test_has_default_image_size_with_non_second_argument_given () {
     1048                $this->assertFalse( has_image_size( 'medium-large' ) );
     1049        }
     1050
     1051        /**
     1052         * Tests the situation where default images sizes should be checked as well.
     1053         *
     1054         * @ticket 43046
     1055         */
     1056        public function test_has_default_image_size_with_second_argument_given () {
     1057                $this->assertTrue( has_image_size( 'medium-large', true ) );
     1058        }
     1059
     1060        /**
    10441061         * @ticket 30346
    10451062         */
    10461063        function test_attachment_url_to_postid() {