'Plain text',
'url' => 'http://something.com',
'user' => 'e107',
'userclass' => 'Everyone (public)',
'progressbar' => "
'thumb.php?src=',
'video' => 'https://www.youtube.com/watch?v=WcuRPzB4RNc',
'bbarea' => '[html]
Rich text.
[/html]',
'boolean' => '1',
'checkboxes' => 'boat,plane',
'country' => 'ad',
'datestamp' => '1484267751',
'dropdown' => 'red',
'email' => 'my@email.com',
'file' => 'e107_banners.zip',
'icon' => 'fa-check',
'language' => 'fr',
'lanlist' => 'en',
'number' => '0',
'password' => 'a8f5f167f44f4964e6c998dee827110c',
'tags' => 'tag1,tag2,tag3',
'textarea' => 'Plain text',
'url' => 'http://something.com',
'user' => '1',
'userclass' => '0',
'progressbar' => '75%',
);
$export = array();
foreach($data as $ok=>$v)
{
$titles[] = $this->cf->getFieldTitle($ok);
// echo ($title)."\n";
$value = $this->cf->getFieldValue($ok);
$valueRaw = $this->cf->getFieldValue($ok, array('mode'=>'raw'));
$this->assertStringStartsWith($expectedValues[$ok], $value);
$this->assertStringContainsString($expectedRawValues[$ok], $valueRaw);
}
// check titles.
$this->assertEquals($titlesExpected,$titles);
}
/*
public function testProcessConfigPost()
{
}
public function testGetTabId()
{
}
public function testGetFieldTypes()
{
}
*/
public function testRenderConfigForm()
{
$this->cf->loadConfig($this->config)->loadData($this->data);
$tab = $this->cf->getTabId();
$this->assertSame('additional', $tab);
$result= $this->cf->renderConfigForm('custom');
$this->assertStringNotContainsString('__tab__', $result);
}
/*
public function testGetFieldValue()
{
}
public function testSetAdminUIConfig()
{
}
public function testSetAdminUIData()
{
}
public function testGetFieldTitle()
{
}
public function testProcessDataPost()
{
}
public function testLoadConfig()
{
}
public function testRenderTest()
{
}
public function testSetTab()
{
}
public function testLoadData()
{
}
public function testGetConfig()
{
}
public function testGetTabLabel()
{
}
public function testGetData()
{
}*/
}