WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/17/2017 03:39:36 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Add assertNotFalse() method to WP_UnitTestCase and use it where appropriate.

Props peterwilsoncc.
Fixes #39219.

File:
1 edited

Legend:

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

    r36873 r39919  
    2626        $doc = new DOMDocument();
    2727        $this->assertTrue( $doc->loadHTML( $actual ) );
    28         $this->assertTrue( false === strpos( $actual, 'That embed can’t be found.' ) );
    29         $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
     28        $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) );
     29        $this->assertNotFalse( strpos( $actual, 'Hello World' ) );
    3030    }
    3131
     
    5353        $this->assertTrue( $doc->loadHTML( $actual ) );
    5454        $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) );
    55         $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
    56         $this->assertTrue( false !== strpos( $actual, 'canola.jpg' ) );
     55        $this->assertNotFalse( strpos( $actual, 'Hello World' ) );
     56        $this->assertNotFalse( strpos( $actual, 'canola.jpg' ) );
    5757    }
    5858
     
    6969        $doc = new DOMDocument();
    7070        $this->assertTrue( $doc->loadHTML( $actual ) );
    71         $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
     71        $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) );
    7272    }
    7373
     
    9393        $this->assertTrue( $doc->loadHTML( $actual ) );
    9494        $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) );
    95         $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
    96         $this->assertTrue( false !== strpos( $actual, 'canola.jpg' ) );
     95        $this->assertNotFalse( strpos( $actual, 'Hello World' ) );
     96        $this->assertNotFalse( strpos( $actual, 'canola.jpg' ) );
    9797    }
    9898
     
    115115        $doc = new DOMDocument();
    116116        $this->assertTrue( $doc->loadHTML( $actual ) );
    117         $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
     117        $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) );
    118118    }
    119119
     
    137137        $doc = new DOMDocument();
    138138        $this->assertTrue( $doc->loadHTML( $actual ) );
    139         $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
     139        $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) );
    140140    }
    141141
     
    158158        $doc = new DOMDocument();
    159159        $this->assertTrue( $doc->loadHTML( $actual ) );
    160         $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
     160        $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) );
    161161    }
    162162
     
    183183        $doc = new DOMDocument();
    184184        $this->assertTrue( $doc->loadHTML( $actual ) );
    185         $this->assertTrue( false === strpos( $actual, 'That embed can’t be found.' ) );
    186         $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
     185        $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) );
     186        $this->assertNotFalse( strpos( $actual, 'Hello World' ) );
    187187    }
    188188
Note: See TracChangeset for help on using the changeset viewer.