コード例 #1
0
 public function testRenderWithOneWidget()
 {
     $kernelMock = $this->mockFactory->getKernelMock();
     $kernelMock->expects($this->any())->method('getConfig')->will($this->returnValue(array('widgets' => array(array('name' => 'test')), 'template' => 'test')));
     $kernelMock->expects($this->once())->method('findFileOnPath')->will($this->returnValue(__DIR__ . '/../../templates/empty.phtml'));
     $widgetMock = $this->getWidgetMock($kernelMock);
     $widgetProviderMock = $this->getWidgetMockProvider($kernelMock);
     $widgetProviderMock->injectMock($widgetMock);
     $dashboard = new Dashboard($kernelMock, $widgetProviderMock);
     $dashboard->render();
 }
コード例 #2
0
ファイル: dashboard.php プロジェクト: ku/reblog.ido.nu
{
    global $sessionkey;
    $path = split('/', $_SERVER["SCRIPT_URL"]);
    $sessionkey = $path[2];
    $content = file_get_contents($filename);
    return $content;
}
require_once 'HTTP/Request.php';
require_once 'lib/adodb/adodb.inc.php';
require_once 'lib/adodb/adodb-pear.inc.php';
require_once 'lib/db.php';
#require_once 'Dashboard_Class.php';
require_once 'Cookie.php';
require_once 'mobileicon.php';
require_once 'HTML/Safe.php';
global $sessionkey;
$host = $_SERVER['HTTP_HOST'];
define('DEVEL', $host == 'reblog-dev.ido.nu');
if (DEVEL && USE_CACHE) {
    #$content =  from_file('log/audio.html');
    #$content =  from_file('log/video_regular.html');
    #$content =  from_file('log/sample.html');
    $content = from_file('log/raw.html');
} else {
    $content = from_tumblr();
    #	savecontent("log/raw.html", $content);
}
$d = new Dashboard($content);
$d->parse();
$d->render();