Lint
This commit is contained in:
parent
68b2cca899
commit
ac4bca35a3
2 changed files with 6 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* LocaleMiddleware class.
|
* LocaleMiddleware class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Alltube;
|
namespace Alltube;
|
||||||
|
|
||||||
use Slim\Http\Request;
|
use Slim\Http\Request;
|
||||||
|
@ -41,7 +42,7 @@ class LocaleMiddleware
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main middleware function
|
* Main middleware function.
|
||||||
*
|
*
|
||||||
* @param Request $request PSR request
|
* @param Request $request PSR request
|
||||||
* @param Response $response PSR response
|
* @param Response $response PSR response
|
||||||
|
|
|
@ -15,7 +15,6 @@ use Slim\Http\Response;
|
||||||
*/
|
*/
|
||||||
class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare tests.
|
* Prepare tests.
|
||||||
*/
|
*/
|
||||||
|
@ -32,8 +31,8 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
||||||
public function testTestLocale()
|
public function testTestLocale()
|
||||||
{
|
{
|
||||||
$locale = [
|
$locale = [
|
||||||
'language'=>'fr',
|
'language'=> 'fr',
|
||||||
'region'=>'FR',
|
'region' => 'FR',
|
||||||
];
|
];
|
||||||
$this->assertEquals('fr_FR', $this->middleware->testLocale($locale));
|
$this->assertEquals('fr_FR', $this->middleware->testLocale($locale));
|
||||||
}
|
}
|
||||||
|
@ -46,8 +45,8 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
|
||||||
public function testLocaleWithWrongLocale()
|
public function testLocaleWithWrongLocale()
|
||||||
{
|
{
|
||||||
$locale = [
|
$locale = [
|
||||||
'language'=>'foo',
|
'language'=> 'foo',
|
||||||
'region'=>'BAR'
|
'region' => 'BAR',
|
||||||
];
|
];
|
||||||
$this->assertNull($this->middleware->testLocale($locale));
|
$this->assertNull($this->middleware->testLocale($locale));
|
||||||
$this->assertNull($this->middleware->testLocale([]));
|
$this->assertNull($this->middleware->testLocale([]));
|
||||||
|
|
Loading…
Reference in a new issue