1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Hero cleanup for Bootstrap5. Switched to placeholder images. Admin-ui type 'image' now loads remote URLs correctly.

This commit is contained in:
Cameron
2021-02-26 10:13:07 -08:00
parent d5a4ef57d1
commit cb95b4b243
16 changed files with 80 additions and 53 deletions

View File

@@ -340,12 +340,40 @@
{
}
*/
public function testDetectType()
{
$tests = array(
0 => array(
'input' => 'gallery/images/butterfly.jpg',
'expected' => 'image'
),
1 => array(
'input' => 'myfile.mov',
'expected' => 'video'
),
2 => array(
'input' => 'myfile.mp4',
'expected' => 'video'
),
3 => array(
'input' => 'https://via.placeholder.com/728x90.png?text=Label',
'expected' => 'image'
),
);
foreach($tests as $index => $var)
{
$result = $this->md->detectType($var['input']);
$this->assertSame($var['expected'], $result, 'Failed on index #'.$index. ': '.$var['input']);
}
}
/*
public function testGetVideos()
{