Make WordPress Core


Ignore:
Timestamp:
05/29/2024 12:20:56 PM (12 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use more specific assertions in a few tests.

Follow-up to [121/tests], [915/tests], [34903], [36307], [43548], [44154], [52286], [57337].

See #60705.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/oembed/controller.php

    r58044 r58235  
    343343        $this->assertSame( $post->post_title, $data['title'] );
    344344        $this->assertSame( 'rich', $data['type'] );
    345         $this->assertTrue( $data['width'] <= $request['maxwidth'] );
     345        $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] );
    346346    }
    347347
     
    386386        $this->assertSame( $post->post_title, $data['title'] );
    387387        $this->assertSame( 'rich', $data['type'] );
    388         $this->assertTrue( $data['width'] <= $request['maxwidth'] );
     388        $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] );
    389389
    390390        update_option( 'show_on_front', 'posts' );
     
    431431        $this->assertSame( $post->post_title, $data['title'] );
    432432        $this->assertSame( 'rich', $data['type'] );
    433         $this->assertTrue( $data['width'] <= $request['maxwidth'] );
     433        $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] );
    434434    }
    435435
     
    717717        $this->assertSame( $post->post_title, $data['title'] );
    718718        $this->assertSame( 'rich', $data['type'] );
    719         $this->assertTrue( $data['width'] <= $request['maxwidth'] );
     719        $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] );
    720720    }
    721721
     
    766766        $this->assertSame( $post->post_title, $data['title'] );
    767767        $this->assertSame( 'rich', $data['type'] );
    768         $this->assertTrue( $data['width'] <= $request['maxwidth'] );
     768        $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] );
    769769
    770770        update_option( 'show_on_front', 'posts' );
Note: See TracChangeset for help on using the changeset viewer.