Skip to content

Instantly share code, notes, and snippets.

@tarecord
Last active July 7, 2023 12:09
Show Gist options
  • Save tarecord/a143910c95ea4fb0b31858b3dcd5460d to your computer and use it in GitHub Desktop.
Save tarecord/a143910c95ea4fb0b31858b3dcd5460d to your computer and use it in GitHub Desktop.
Test plugin activates successfully
<?php
// ...
public function tryActivatingPlugin(AcceptanceTester $I)
{
// Log in as an administrator.
$I->loginAsAdmin();
// Navigate to the plugins page.
$I->amOnPluginsPage();
// Attempt to activate the plugin.
$I->activatePlugin('my-plugin');
// Verify that the plugin actually activated successfully.
$I->seePluginActivated('my-plugin');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment