mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-23 01:02:45 +00:00
Includes removing `.php` from some older group names, because most of the groups are no longer named based on the file containing the function, and sometimes functions move around, making the file-based group name inaccurate. Props afercia, aristath, poena, SergeyBiryukov. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@56971 602fd350-edb4-49c9-b593-d223f7449a82
34 lines
814 B
PHP
34 lines
814 B
PHP
<?php
|
|
|
|
/**
|
|
* @group admin
|
|
* @group user
|
|
*
|
|
* @covers WP_Users_List_Table
|
|
*/
|
|
class Tests_Admin_wpUsersListTable extends WP_UnitTestCase {
|
|
/**
|
|
* @var WP_Users_List_Table
|
|
*/
|
|
public $table = false;
|
|
|
|
public function set_up() {
|
|
parent::set_up();
|
|
$this->table = _get_list_table( 'WP_Users_List_Table', array( 'screen' => 'users' ) );
|
|
}
|
|
|
|
/**
|
|
* @ticket 42066
|
|
*
|
|
* @covers WP_Users_List_Table::get_views
|
|
*/
|
|
public function test_get_views_should_return_views_by_default() {
|
|
$expected = array(
|
|
'all' => '<a href="users.php" class="current" aria-current="page">All <span class="count">(1)</span></a>',
|
|
'administrator' => '<a href="users.php?role=administrator">Administrator <span class="count">(1)</span></a>',
|
|
);
|
|
|
|
$this->assertSame( $expected, $this->table->get_views() );
|
|
}
|
|
}
|