<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\App;
use Friendica\Core\Config;
use Friendica\DI;
+use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Render\FriendicaSmartyEngine;
use Friendica\Util\Profiler;
use Mockery\MockInterface;
* Mock the App
*
* @param vfsStreamDirectory $root The root directory
- * @param bool $raw If true, no config mocking will be done
+ * @param bool $raw If true, no config mocking will be done
+ *
+ * @throws InternalServerErrorException
*/
public function mockApp(vfsStreamDirectory $root, $raw = false)
{
->andReturn($root->url());
$this->profilerMock = \Mockery::mock(Profiler::class);
+ $this->profilerMock->shouldReceive('startRecording');
+ $this->profilerMock->shouldReceive('stopRecording');
$this->profilerMock->shouldReceive('saveTimestamp');
$this->dice->shouldReceive('create')
->with(Profiler::class)
$this->app
->shouldReceive('getCurrentTheme')
->andReturn('Smarty3');
-
+ $this->app->shouldReceive('getThemeInfoValue')
+ ->with('videowidth')
+ ->andReturn(425);
+ $this->app->shouldReceive('getThemeInfoValue')
+ ->with('videoheight')
+ ->andReturn(350);
+
DI::init($this->dice);
if ($raw) {