Skip to content

Commit 48cc082

Browse files
committed
Tests: Use real plugin fixture in plugins list table test
1 parent 7c1321e commit 48cc082

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/phpunit/tests/admin/wpPluginsListTable.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public function test_single_row_should_output_the_file_column() {
336336

337337
$original_status = $status;
338338
$status = 'all';
339+
$plugins = get_plugins();
339340

340341
$column_info = array(
341342
array(
@@ -355,12 +356,12 @@ public function test_single_row_should_output_the_file_column() {
355356
$list_table_mock->expects( $this->once() )->method( 'get_column_info' )->willReturn( $column_info );
356357

357358
ob_start();
358-
$list_table_mock->single_row( array( 'fake-plugin.php', $this->fake_plugin['fake-plugin.php'] ) );
359+
$list_table_mock->single_row( array( 'hello.php', $plugins['hello.php'] ) );
359360
$actual = ob_get_clean();
360361

361362
$status = $original_status;
362363

363-
$this->assertStringContainsString( "<td class='column-file'><code>fake-plugin.php</code></td>", $actual );
364+
$this->assertStringContainsString( "<td class='column-file'><code>hello.php</code></td>", $actual );
364365
}
365366

366367
/**

0 commit comments

Comments
 (0)