Make WordPress Core


Ignore:
Timestamp:
12/10/2017 12:30:32 AM (7 years ago)
Author:
johnbillion
Message:

Build/Test tools: Switch to PHPUnit's expectOutputString() method instead of manually using output buffers for output assertions.

Props birgire
Fixes #42098

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/listAuthors.php

    r42343 r42382  
    162162    function test_wp_list_authors_echo() {
    163163        $expected['echo'] = '<li><a href="' . self::$user_urls[1] . '" title="Posts by bob">bob</a></li><li><a href="' . self::$user_urls[2] . '" title="Posts by paul">paul</a></li><li><a href="' . self::$user_urls[0] . '" title="Posts by zack">zack</a></li>';
    164         ob_start();
     164        $this->expectOutputString( $expected['echo'] );
    165165        wp_list_authors( array( 'echo' => true ) );
    166         $actual = ob_get_clean();
    167         $this->AssertEquals( $expected['echo'], $actual );
    168166    }
    169167
Note: See TracChangeset for help on using the changeset viewer.