Skip to content

Commit

Permalink
test(webdriver) remove bloat from test plugin code
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Aug 30, 2024
1 parent d91105a commit 25169bb
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions tests/webdriver/PluginActivationCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,8 @@ public function be_able_to_activate_plugins_in_a_long_list(WebDriverTester $I):

protected function scaffoldTestPlugins(WebDriverTester $I): void
{
$template
= <<< HANDLEBARS
/*
Plugin Name: Plugin {{letter}}
Plugin URI: https://wordpress.org/plugins/{{letter}}/
Description: Plugin {{letter}} description
Version: 0.1.0
Author: Plugin {{letter}} author
Author URI: http://example.com/{{letter}}-plugin
Text Domain: {{letter}}_plugin
Domain Path: /languages
*/
HANDLEBARS;

foreach (range('A', 'Z') as $letter) {
$compiled = str_replace('{{letter}}', $letter, $template);
$compiled = "function {$letter}_main(){}";
$I->havePlugin("plugin-{$letter}/plugin-{$letter}.php", $compiled);
}
}
Expand Down

0 comments on commit 25169bb

Please sign in to comment.