1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-07 07:06:30 +02:00

Issue #4473 - some merged code from Deltik

This commit is contained in:
Cameron
2021-03-31 13:04:20 -07:00
parent 8ff427cfc4
commit 5ed2440272
2 changed files with 18 additions and 2 deletions

View File

@@ -118,14 +118,17 @@
// clear the table. // clear the table.
$sql = e107::getDb(); $sql = e107::getDb();
$fieldCount = (int) $sql->count('user_extended_struct'); /* $fieldCount = (int) $sql->count('user_extended_struct');
if($fieldCount > 17) if($fieldCount > 17)
{ {
codecept_debug("Truncating user_extended_struct"); codecept_debug("Truncating user_extended_struct");
$sql->truncate('user_extended_struct'); $sql->truncate('user_extended_struct');
} }*/
$sql->truncate('user_extended_struct');
// Add a field of each type. // Add a field of each type.

View File

@@ -12,6 +12,10 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
{ {
/** @var e_parse_shortcode */ /** @var e_parse_shortcode */
private $scParser; private $scParser;
/**
* @var e_render
*/
private $original_e_render;
public function _before() public function _before()
{ {
@@ -28,6 +32,15 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
} }
$this->scParser->__construct(); $this->scParser->__construct();
$this->original_e_render = e107::getRender();
$mock_e_render = $this->make('e_render');
e107::setRegistry('core/e107/singleton/e_render', $mock_e_render);
}
public function _after()
{
e107::setRegistry('core/e107/singleton/e_render', $this->original_e_render);
} }
// public function testShortcode_SITELINKS_ALT() // public function testShortcode_SITELINKS_ALT()