Make WordPress Core

Ticket #54788: 54788-phpunit-test.diff

File 54788-phpunit-test.diff, 1.5 KB (added by costdev, 2 years ago)

Tests: Add muted to the test_wp_video_shortcode_attributes test method. @antpb Can you review this patch for addition along with PR 2137 when it's confirmed for commit?

  • tests/phpunit/tests/media.php

    diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php
    index 592b19e328..0096396995 100644
    a b VIDEO; 
    10221022
    10231023        /**
    10241024         * @ticket 35367
     1025         * @ticket 54788
    10251026         * @depends test_video_shortcode_body
    10261027         */
    10271028        public function test_wp_video_shortcode_attributes() {
    VIDEO; 
    10341035                $this->assertStringContainsString( 'src="https://example.com/foo.mp4', $actual );
    10351036                $this->assertStringNotContainsString( 'loop', $actual );
    10361037                $this->assertStringNotContainsString( 'autoplay', $actual );
     1038                $this->assertStringNotContainsString( 'muted', $actual );
    10371039                $this->assertStringContainsString( 'preload="metadata"', $actual );
    10381040                $this->assertStringContainsString( 'width="640"', $actual );
    10391041                $this->assertStringContainsString( 'height="360"', $actual );
    VIDEO; 
    10451047                                'poster'   => 'https://example.com/foo.png',
    10461048                                'loop'     => true,
    10471049                                'autoplay' => true,
     1050                                'muted'    => true,
    10481051                                'preload'  => true,
    10491052                                'width'    => 123,
    10501053                                'height'   => 456,
    VIDEO; 
    10561059                $this->assertStringContainsString( 'poster="https://example.com/foo.png', $actual );
    10571060                $this->assertStringContainsString( 'loop="1"', $actual );
    10581061                $this->assertStringContainsString( 'autoplay="1"', $actual );
     1062                $this->assertStringContainsString( 'muted', $actual );
    10591063                $this->assertStringContainsString( 'preload="1"', $actual );
    10601064                $this->assertStringContainsString( 'width="123"', $actual );
    10611065                $this->assertStringContainsString( 'height="456"', $actual );