yt:channel:UC7vv3cBq14FRXajteZt6FEg
UC7vv3cBq14FRXajteZt6FEg
egucom2014
egucom2014
https://www.youtube.com/channel/UC7vv3cBq14FRXajteZt6FEg
2016-01-17T11:31:33+00:00
yt:video:palm1QdV8ZI
palm1QdV8ZI
UC7vv3cBq14FRXajteZt6FEg
[EGU] Erstes Offizielles Intro
egucom2014
https://www.youtube.com/channel/UC7vv3cBq14FRXajteZt6FEg
2017-09-30T18:44:07+00:00
2019-01-18T20:11:48+00:00
[EGU] Erstes Offizielles Intro
Das erste Intro von Eternal GamerZ United!
';
/** @var xmlClass */
private $_xml;
protected function _before()
{
try
{
$this->_xml = $this->make('xmlClass',
[
'getRemoteFile' => function($address, $timeout = 10, $postData = null)
{
$this->_xml->xmlFileContents = self::RAW_XML;
return self::RAW_XML;
},
'xmlFileContents' => self::RAW_XML
]
);
// $this->_xml->__construct();
}
catch (Exception $e)
{
$this->assertTrue(false, "Couldn't load xmlClass object");
}
}
/*
public function testXml_convert_to_array()
{
}
*/
public function testLoadXMLfile()
{
$feed = 'https://www.youtube.com/feeds/videos.xml?channel_id=UC7vv3cBq14FRXajteZt6FEg';
$contents = $this->_xml->reset(true)->loadXMLFile($feed,true);
$this->assertNotEmpty($contents);
// print_r($contents);
}
/*
public function testSetOptFilter()
{
}
public function testSetOptStringTags()
{
}
*/
public function testParseXml()
{
$raw = self::RAW_XML;
$result = $this->_xml->parseXml($raw,true);
$this->assertEquals('egucom2014', $result['author']['name']);
}
/*
public function testE107ExportValue()
{
}
public function testSetOptArrayTags()
{
}
public function testParseStringTags()
{
}
public function testGetErrors()
{
}
public function testSetOptAddRoot()
{
}
public function testE107ImportValue()
{
}
public function testGetLastErrorMessage()
{
}
public function testSetOptStripComments()
{
}
*/
public function testGetRemoteFile()
{
$feed = 'https://www.youtube.com/feeds/videos.xml?channel_id=UC7vv3cBq14FRXajteZt6FEg';
$contents = $this->_xml->getRemoteFile($feed,true);
$this->assertStringContainsString('',$contents);
}
/*
public function testSetOptForceArray()
{
}
public function testSetOptValueKey()
{
}
*/
public function testE107ImportPrefs()
{
$file = e_CORE."xml/default_install.xml";
$checks = array('ssl_enabled', 'smtp_server', 'e_jslib_core', 'e_jslib_plugin');
$xmlArray = $this->_xml->loadXMLfile($file, 'advanced');
$arr = array();
foreach($xmlArray['prefs']['core'] as $val)
{
if(in_array($val['@attributes']['name'],$checks))
{
$arr['prefs']['core'][] = $val;
}
}
$result = $this->_xml->e107ImportPrefs($arr);
$expected = array (
'e_jslib_core' =>
array (
'prototype' => 'none',
'jquery' => 'all',
),
'e_jslib_plugin' =>
array (
),
'smtp_server' => '',
'ssl_enabled' => '0',
);
$this->assertEquals($expected,$result);
}
/*
public function testSetFeedUrl()
{
}
public function testXml2array()
{
}
*/
public function testE107Import()
{
}
/*
public function testSetUrlPrefix()
{
}
*/
public function testE107Export()
{
$ret = $this->_xml->e107Export(array('core'), null, null, null, array('return'=>true));
$incorrect = '';
$correct = '';
$this->assertStringNotContainsString($incorrect, $ret);
$this->assertStringContainsString($correct, $ret);
}
}