示例#1
0
 public function testBase()
 {
     $h = new Url($this->container);
     $_SERVER['PHP_SELF'] = '/';
     $_SERVER['SERVER_NAME'] = 'localhost';
     $_SERVER['SERVER_PORT'] = 1234;
     $this->assertEquals('http://localhost:1234/', $h->base());
     $c = new Config($this->container);
     $c->save(array('application_url' => 'https://mykanboard/'));
     $this->assertEquals('https://mykanboard/', $c->get('application_url'));
     $this->assertEquals('https://mykanboard/', $h->base());
 }
示例#2
0
<?php

$embed = \Helper\Url::parseEmbed($article->link);
if (!$embed) {
    return;
}
?>
<div class="typo-p"><?php 
echo $embed['html'];
?>
</div>