Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/19/2016 06:02:43 PM (8 years ago)
Author:
r-a-y
Message:

Tests: Switch out assertNotFalse() for assertInternalType() for new button unit tests.

assertNotFalse() does not work in PHP 5.2.

Props hnla. (Make-up props! Sorry again!)

See #7226.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/class-bp-button.php

    r11114 r11115  
    216216        ) );
    217217
    218         $this->assertNotFalse( strpos( $b->contents, '<section ' ) );
    219         $this->assertNotFalse( strpos( $b->contents, 'class="section-class ' ) );
    220         $this->assertNotFalse( strpos( $b->contents, 'id="section-id"' ) );
    221         $this->assertNotFalse( strpos( $b->contents, 'href="http://example.com"' ) );
    222         $this->assertNotFalse( strpos( $b->contents, 'class="link-class"' ) );
    223         $this->assertNotFalse( strpos( $b->contents, 'id="link-id"' ) );
    224         $this->assertNotFalse( strpos( $b->contents, 'rel="nofollow"' ) );
    225         $this->assertNotFalse( strpos( $b->contents, 'title="link-title"' ) );
     218        $this->assertInternalType( 'int', strpos( $b->contents, '<section ' ) );
     219        $this->assertInternalType( 'int', strpos( $b->contents, 'class="section-class ' ) );
     220        $this->assertInternalType( 'int', strpos( $b->contents, 'id="section-id"' ) );
     221        $this->assertInternalType( 'int', strpos( $b->contents, 'href="http://example.com"' ) );
     222        $this->assertInternalType( 'int', strpos( $b->contents, 'class="link-class"' ) );
     223        $this->assertInternalType( 'int', strpos( $b->contents, 'id="link-id"' ) );
     224        $this->assertInternalType( 'int', strpos( $b->contents, 'rel="nofollow"' ) );
     225        $this->assertInternalType( 'int', strpos( $b->contents, 'title="link-title"' ) );
    226226    }
    227227
     
    242242        ) );
    243243
    244         $this->assertNotFalse( strpos( $b->contents, '<button class="new-class"' ) );
     244        $this->assertInternalType( 'int', strpos( $b->contents, '<button class="new-class"' ) );
    245245    }
    246246
Note: See TracChangeset for help on using the changeset viewer.