mirror of
https://github.com/e107inc/e107.git
synced 2025-07-09 09:13:25 +02:00
Test for corrupted linkwords pref.
This commit is contained in:
24
tests/_data/unserializeTest2.log
Normal file
24
tests/_data/unserializeTest2.log
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
array (
|
||||||
|
'e_url_list' =>
|
||||||
|
array (
|
||||||
|
'contact' => 'contact',
|
||||||
|
'faqs' => 'faqs',
|
||||||
|
'news' => 'news',
|
||||||
|
'orders' => 'orders',
|
||||||
|
'vstore' => 'vstore',
|
||||||
|
),
|
||||||
|
'lw_page_visibility' => '',
|
||||||
|
'lw_ajax_enable' => '',
|
||||||
|
'lw_context_visibility' => 'array (
|
||||||
|
\'OLDDEFAULT\' => \'\',
|
||||||
|
\'TITLE\' => \'\',
|
||||||
|
\'SUMMARY\' => 1,
|
||||||
|
\'BODY\' => 1,
|
||||||
|
\'DESCRIPTION\'=> 1,
|
||||||
|
\'USER_TITLE\' => \'\',
|
||||||
|
\'USER_BODY\' => 1,
|
||||||
|
\'LINKTEXT\' => \'\',
|
||||||
|
\'RAWTEXT\' => \'\'
|
||||||
|
)',
|
||||||
|
'e_tohtml_list' => '',
|
||||||
|
)
|
@ -52,11 +52,18 @@ $data = array (
|
|||||||
{
|
{
|
||||||
|
|
||||||
$src = codecept_data_dir()."unserializeTest.log";
|
$src = codecept_data_dir()."unserializeTest.log";
|
||||||
$string_0 = file_get_contents($src);
|
$stringFile_0 = file_get_contents($src);
|
||||||
$actual = $this->arrObj->unserialize($string_0);
|
$actual = $this->arrObj->unserialize($stringFile_0);
|
||||||
$this->assertArrayHasKey('email_password', $actual);
|
$this->assertArrayHasKey('email_password', $actual);
|
||||||
|
|
||||||
|
|
||||||
|
// Check for legacy (corrupted) link-words preferences.
|
||||||
|
$src = codecept_data_dir()."unserializeTest2.log";
|
||||||
|
$stringFile_1 = file_get_contents($src);
|
||||||
|
$actual = $this->arrObj->unserialize($stringFile_1);
|
||||||
|
$this->assertArrayHasKey('lw_context_visibility', $actual);
|
||||||
|
|
||||||
|
|
||||||
// Buggy value test -------.
|
// Buggy value test -------.
|
||||||
$string_1 = "\$data = array(
|
$string_1 = "\$data = array(
|
||||||
\'buggy_array\' => \'some value\',
|
\'buggy_array\' => \'some value\',
|
||||||
|
Reference in New Issue
Block a user