Skip to content

Commit

Permalink
Refactor directory traversal in bootstrap script
Browse files Browse the repository at this point in the history
Refactored the way directory navigation is handled in the bootstrap script by replacing `dirname( dirname( __FILE__ ) )` with the more simplified `dirname( __DIR__, 1 )`. This change simplifies the code and improves readability. It does not change the functionality of the application.
  • Loading branch information
attackant committed Nov 3, 2023
1 parent 4e3e330 commit 1d4bbb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function apple_news_require_file( string $file ) {
}

// Autoloading for prophecy.
apple_news_require_file( dirname( dirname( __FILE__ ) ) . '/vendor/autoload.php' );
apple_news_require_file( dirname( __DIR__, 1 ) . '/vendor/autoload.php' );

/**
* Install WordPress and load the plugin.
Expand Down Expand Up @@ -69,7 +69,7 @@ function () {
$bc_setup->action_init();

// Load the plugin.
require dirname( dirname( __FILE__ ) ) . '/apple-news.php';
require dirname( __DIR__, 1 ) . '/apple-news.php';
}
)->install();

Expand Down

0 comments on commit 1d4bbb5

Please sign in to comment.