mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Fixes
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
$this->assertTrue(false, "Couldn't load e107table object");
|
||||
}
|
||||
|
||||
$this->ns->__construct();
|
||||
|
||||
}
|
||||
/*
|
||||
public function testGetStyle()
|
||||
|
@@ -491,12 +491,23 @@ TMP;
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
public function testToText()
|
||||
{
|
||||
$arr = array(
|
||||
0 => array('html'=>"<h1><a href='#'>My Caption</a></h1>", 'expected' => 'My Caption'),
|
||||
1 => array('html'=>"<div><h1><a href='#'>My Caption</a></h1></div>", 'expected' => 'My Caption'),
|
||||
);
|
||||
|
||||
|
||||
foreach($arr as $var)
|
||||
{
|
||||
$result = $this->tp->toText($var['html']);
|
||||
$this->assertEquals($var['expected'],$result);
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
public function testUstrtolower()
|
||||
{
|
||||
|
||||
|
@@ -15,11 +15,14 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
|
||||
|
||||
public function _before()
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
$this->scParser = $this->make('e_parse_shortcode');
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->fail("Couldn't create e_parse_shortcode object");
|
||||
}
|
||||
|
||||
$this->scParser->__construct();
|
||||
}
|
||||
|
||||
@@ -59,12 +62,32 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
public function testParseCodes()
|
||||
{
|
||||
$text = '<ul class="dropdown-menu {LINK_SUB_OVERSIZED}" role="menu" >';
|
||||
|
||||
$array = array(
|
||||
'LINK_TEXT' => 'Content',
|
||||
'LINK_URL' => '#',
|
||||
'ONCLICK' => '',
|
||||
'SUB_HEAD' => '',
|
||||
'SUB_MENU' => '',
|
||||
|
||||
'ID' => '',
|
||||
'SUB_ID' => '',
|
||||
'LINK_CLASS' => 'e-expandit',
|
||||
'SUB_CLASS' => 'e-hideme e-expandme',
|
||||
'LINK_IMAGE' => '',
|
||||
'LINK_SUB_OVERSIZED' => 'oversized',
|
||||
'LINK_BADGE' => '',
|
||||
);
|
||||
|
||||
$result = $this->scParser->parseCodes($text, false, $array);
|
||||
|
||||
// var_dump($result);
|
||||
}
|
||||
|
||||
/*
|
||||
public function testInitShortcodeClass()
|
||||
{
|
||||
|
||||
|
@@ -175,6 +175,8 @@
|
||||
|
||||
$xmlArray = $this->_xml->loadXMLfile($file, 'advanced');
|
||||
|
||||
|
||||
|
||||
$arr = array();
|
||||
|
||||
foreach($xmlArray['prefs']['core'] as $val)
|
||||
@@ -229,7 +231,7 @@
|
||||
|
||||
public function testE107Export()
|
||||
{
|
||||
$ret = $this->_xml->e107Export(array('core'), null, null, array('return'=>true));
|
||||
$ret = $this->_xml->e107Export(array('core'), null, null, null, array('return'=>true));
|
||||
|
||||
$incorrect = '<core name="e_jslib_plugin"><![CDATA[Array]]></core>';
|
||||
$correct = '<core name="e_jslib_plugin"><![CDATA[array ()]]></core>';
|
||||
|
Reference in New Issue
Block a user