style: Declare imported classes at the top of the file

This commit is contained in:
Pierre Rudloff 2018-02-05 16:48:58 +01:00
parent 33530eff4d
commit 04fe43a1ca
12 changed files with 81 additions and 63 deletions

View file

@ -9,6 +9,7 @@ use Alltube\Config;
use Alltube\Controller\FrontController;
use Alltube\LocaleManager;
use Alltube\ViewFactory;
use Exception;
use PHPUnit\Framework\TestCase;
use Slim\Container;
use Slim\Http\Environment;
@ -348,7 +349,7 @@ class FrontControllerTest extends TestCase
*/
public function testError()
{
$result = $this->controller->error($this->request, $this->response, new \Exception('foo'));
$result = $this->controller->error($this->request, $this->response, new Exception('foo'));
$this->assertTrue($result->isServerError());
}

View file

@ -27,7 +27,7 @@ class LocaleManagerTest extends TestCase
protected function setUp()
{
$this->localeManager = new LocaleManager();
$_SESSION['Alltube\LocaleManager']['locale'] = 'foo_BAR';
$_SESSION[LocaleManager::class]['locale'] = 'foo_BAR';
}
/**

View file

@ -126,7 +126,7 @@ class VideoDownloadTest extends TestCase
* Test getURL function with a protected video and no password.
*
* @return void
* @expectedException \Alltube\PasswordException
* @expectedException Alltube\PasswordException
*/
public function testGetURLWithMissingPassword()
{