Skip to content

Commit

Permalink
Rename variables mentioned in lint results
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Nov 22, 2024
1 parent 05721c3 commit 7d9ac61
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/phpunit/tests/Checker/Checks/File_Type_Check_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,19 @@ public function test_run_with_duplicated_named_errors() {
$check = new File_Type_Check();

// Use reflection to make protected method accessible.
$reflection = new ReflectionClass( $check );
$checkFilesMethod = $reflection->getMethod( 'look_for_badly_named_files' );
$checkFilesMethod->setAccessible( true );
$reflection = new ReflectionClass( $check );
$check_files_method = $reflection->getMethod( 'look_for_badly_named_files' );
$check_files_method->setAccessible( true );

// Define the custom file list with duplicate names as they would appear in a plugin directory.
$customFiles = array(
$custom_files = array(
UNIT_TESTS_PLUGIN_DIR . 'test-plugin-file-type-badly-named-files-errors/custom-file.php',
UNIT_TESTS_PLUGIN_DIR . 'test-plugin-file-type-badly-named-files-errors/Custom-File.php',
UNIT_TESTS_PLUGIN_DIR . 'test-plugin-file-type-badly-named-files-errors/custom-FILE.php',
);

// Invoke method with the Check_Result instance and custom file list.
$result = $checkFilesMethod->invoke( $check, $check_result, $customFiles );
$result = $check_files_method->invoke( $check, $check_result, $custom_files );

$errors = $check_result->get_errors();

Expand Down

0 comments on commit 7d9ac61

Please sign in to comment.