1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-13 14:04:51 +02:00

Made it easier to debug a single plugin. Added extra checks in the linksword plugin test. Disabled empty db_verify tests.

This commit is contained in:
Cameron
2018-07-23 14:02:30 -07:00
parent 3c8e52af93
commit 0a1d768840
3 changed files with 35 additions and 7 deletions

View File

@@ -12,7 +12,7 @@
class pluginsTest extends \Codeception\Test\Unit
{
// protected $_plg;
protected $_debugPlugin = false; // 'linkwords'; // add plugin-dir for full report.
protected function _before()
{
@@ -26,8 +26,9 @@
}*/
}
private function makePluginReport($pluginDir, $debug=false)
private function makePluginReport($pluginDir)
{
$debug = $this->_debugPlugin;
$debug_text = "\n\n---- Log \n\n";
$log = e107::getPlugin()->getLog();
@@ -100,9 +101,10 @@
$debug_text .= "-------------------------------------------------------------------\n";
if($debug === true)
if(!empty($debug) && $pluginDir === $debug)
{
codecept_debug($debug_text);
echo $debug_text;
}
return array(
@@ -185,7 +187,17 @@
public function testLinkwords()
{
$this->pluginInstall('linkwords');
$pref1 = e107::pref('core', 'lw_custom_class');
$this->assertNotEmpty($pref1);
$pref2 = e107::pref('core', 'lw_context_visibility');
$this->assertNotEmpty($pref2['SUMMARY']);
$this->pluginUninstall('linkwords');
$pref2 = e107::pref('core', 'lw_context_visibility');
$this->assertEmpty($pref2);
}
public function testPm()
@@ -223,7 +235,7 @@
e107::getPlugin()->install($pluginDir);
$install = $this->makePluginReport($pluginDir, false); // set to true to see more info
$install = $this->makePluginReport($pluginDir);
//todo additional checks
@@ -242,7 +254,7 @@
e107::getPlugin()->uninstall($pluginDir, $opts);
$uninstall = $this->makePluginReport($pluginDir, false); // set to true to see more info
$uninstall = $this->makePluginReport($pluginDir);
//todo additional checks