Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
f8731dad
Commit
f8731dad
authored
May 09, 2017
by
Pascal Luna
Committed by
Fabien Potencier
May 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use PHPUnit\Framework\TestCase in Silex tests
parent
916ab5f8
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
80 additions
and
46 deletions
+80
-46
tests/Silex/Tests/Application/FormTraitTest.php
tests/Silex/Tests/Application/FormTraitTest.php
+2
-1
tests/Silex/Tests/Application/MonologTraitTest.php
tests/Silex/Tests/Application/MonologTraitTest.php
+2
-1
tests/Silex/Tests/Application/SecurityTraitTest.php
tests/Silex/Tests/Application/SecurityTraitTest.php
+2
-1
tests/Silex/Tests/Application/SwiftmailerTraitTest.php
tests/Silex/Tests/Application/SwiftmailerTraitTest.php
+2
-1
tests/Silex/Tests/Application/TranslationTraitTest.php
tests/Silex/Tests/Application/TranslationTraitTest.php
+2
-1
tests/Silex/Tests/Application/TwigTraitTest.php
tests/Silex/Tests/Application/TwigTraitTest.php
+2
-1
tests/Silex/Tests/Application/UrlGeneratorTraitTest.php
tests/Silex/Tests/Application/UrlGeneratorTraitTest.php
+2
-1
tests/Silex/Tests/ApplicationTest.php
tests/Silex/Tests/ApplicationTest.php
+2
-1
tests/Silex/Tests/CallbackResolverTest.php
tests/Silex/Tests/CallbackResolverTest.php
+2
-1
tests/Silex/Tests/CallbackServicesTest.php
tests/Silex/Tests/CallbackServicesTest.php
+2
-1
tests/Silex/Tests/ControllerCollectionTest.php
tests/Silex/Tests/ControllerCollectionTest.php
+2
-1
tests/Silex/Tests/ControllerResolverTest.php
tests/Silex/Tests/ControllerResolverTest.php
+2
-1
tests/Silex/Tests/ControllerTest.php
tests/Silex/Tests/ControllerTest.php
+2
-1
tests/Silex/Tests/EventListener/LogListenerTest.php
tests/Silex/Tests/EventListener/LogListenerTest.php
+2
-1
tests/Silex/Tests/ExceptionHandlerTest.php
tests/Silex/Tests/ExceptionHandlerTest.php
+2
-4
tests/Silex/Tests/FunctionalTest.php
tests/Silex/Tests/FunctionalTest.php
+2
-1
tests/Silex/Tests/JsonTest.php
tests/Silex/Tests/JsonTest.php
+2
-1
tests/Silex/Tests/LazyDispatcherTest.php
tests/Silex/Tests/LazyDispatcherTest.php
+2
-1
tests/Silex/Tests/LazyRequestMatcherTest.php
tests/Silex/Tests/LazyRequestMatcherTest.php
+5
-4
tests/Silex/Tests/LocaleTest.php
tests/Silex/Tests/LocaleTest.php
+2
-1
tests/Silex/Tests/MiddlewareTest.php
tests/Silex/Tests/MiddlewareTest.php
+2
-1
tests/Silex/Tests/Provider/AssetServiceProviderTest.php
tests/Silex/Tests/Provider/AssetServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
+5
-4
tests/Silex/Tests/Provider/FormServiceProviderTest.php
tests/Silex/Tests/Provider/FormServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php
tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php
.../Silex/Tests/Provider/HttpFragmentServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/MonologServiceProviderTest.php
tests/Silex/Tests/Provider/MonologServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/RoutingServiceProviderTest.php
tests/Silex/Tests/Provider/RoutingServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/SerializerServiceProviderTest.php
tests/Silex/Tests/Provider/SerializerServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php
...s/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/TranslationServiceProviderTest.php
...s/Silex/Tests/Provider/TranslationServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/TwigServiceProviderTest.php
tests/Silex/Tests/Provider/TwigServiceProviderTest.php
+2
-1
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
+2
-1
tests/Silex/Tests/Route/SecurityTraitTest.php
tests/Silex/Tests/Route/SecurityTraitTest.php
+2
-1
tests/Silex/Tests/RouterTest.php
tests/Silex/Tests/RouterTest.php
+2
-1
tests/Silex/Tests/ServiceControllerResolverTest.php
tests/Silex/Tests/ServiceControllerResolverTest.php
+2
-1
tests/Silex/Tests/StreamTest.php
tests/Silex/Tests/StreamTest.php
+2
-1
No files found.
tests/Silex/Tests/Application/FormTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Provider\FormServiceProvider
;
/**
...
...
@@ -18,7 +19,7 @@ use Silex\Provider\FormServiceProvider;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
FormTraitTest
extends
\PHPUnit_Framework_
TestCase
class
FormTraitTest
extends
TestCase
{
public
function
testForm
()
{
...
...
tests/Silex/Tests/Application/MonologTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Provider\MonologServiceProvider
;
use
Monolog\Handler\TestHandler
;
use
Monolog\Logger
;
...
...
@@ -20,7 +21,7 @@ use Monolog\Logger;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
MonologTraitTest
extends
\PHPUnit_Framework_
TestCase
class
MonologTraitTest
extends
TestCase
{
public
function
testLog
()
{
...
...
tests/Silex/Tests/Application/SecurityTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Provider\SecurityServiceProvider
;
use
Symfony\Component\Security\Core\User\User
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
SecurityTraitTest
extends
\PHPUnit_Framework_
TestCase
class
SecurityTraitTest
extends
TestCase
{
public
function
testEncodePassword
()
{
...
...
tests/Silex/Tests/Application/SwiftmailerTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Provider\SwiftmailerServiceProvider
;
/**
...
...
@@ -18,7 +19,7 @@ use Silex\Provider\SwiftmailerServiceProvider;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
SwiftmailerTraitTest
extends
\PHPUnit_Framework_
TestCase
class
SwiftmailerTraitTest
extends
TestCase
{
public
function
testMail
()
{
...
...
tests/Silex/Tests/Application/TranslationTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Provider\TranslationServiceProvider
;
/**
...
...
@@ -18,7 +19,7 @@ use Silex\Provider\TranslationServiceProvider;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
TranslationTraitTest
extends
\PHPUnit_Framework_
TestCase
class
TranslationTraitTest
extends
TestCase
{
public
function
testTrans
()
{
...
...
tests/Silex/Tests/Application/TwigTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Provider\TwigServiceProvider
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpFoundation\StreamedResponse
;
...
...
@@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
TwigTraitTest
extends
\PHPUnit_Framework_
TestCase
class
TwigTraitTest
extends
TestCase
{
public
function
testRender
()
{
...
...
tests/Silex/Tests/Application/UrlGeneratorTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Application
;
use
PHPUnit\Framework\TestCase
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
/**
...
...
@@ -18,7 +19,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
UrlGeneratorTraitTest
extends
\PHPUnit_Framework_
TestCase
class
UrlGeneratorTraitTest
extends
TestCase
{
public
function
testUrl
()
{
...
...
tests/Silex/Tests/ApplicationTest.php
View file @
f8731dad
...
...
@@ -13,6 +13,7 @@ namespace Silex\Tests;
use
Fig\Link\GenericLinkProvider
;
use
Fig\Link\Link
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\ControllerCollection
;
use
Silex\Api\ControllerProviderInterface
;
...
...
@@ -30,7 +31,7 @@ use Symfony\Component\Routing\RouteCollection;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
ApplicationTest
extends
\PHPUnit_Framework_
TestCase
class
ApplicationTest
extends
TestCase
{
public
function
testMatchReturnValue
()
{
...
...
tests/Silex/Tests/CallbackResolverTest.php
View file @
f8731dad
...
...
@@ -11,10 +11,11 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Pimple\Container
;
use
Silex\CallbackResolver
;
class
CallbackResolverTest
extends
\PHPUnit_Framework_
Testcase
class
CallbackResolverTest
extends
Testcase
{
private
$app
;
private
$resolver
;
...
...
tests/Silex/Tests/CallbackServicesTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
use
Silex\Provider\ServiceControllerServiceProvider
;
...
...
@@ -20,7 +21,7 @@ use Silex\Provider\ServiceControllerServiceProvider;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
CallbackServicesTest
extends
\PHPUnit_Framework_
TestCase
class
CallbackServicesTest
extends
TestCase
{
public
$called
=
array
();
...
...
tests/Silex/Tests/ControllerCollectionTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Controller
;
use
Silex\ControllerCollection
;
...
...
@@ -23,7 +24,7 @@ use Symfony\Component\Routing\RouteCollection;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
ControllerCollectionTest
extends
\PHPUnit_Framework_
TestCase
class
ControllerCollectionTest
extends
TestCase
{
public
function
testGetRouteCollectionWithNoRoutes
()
{
...
...
tests/Silex/Tests/ControllerResolverTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\ControllerResolver
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
ControllerResolverTest
extends
\PHPUnit_Framework_
TestCase
class
ControllerResolverTest
extends
TestCase
{
/**
* @group legacy
...
...
tests/Silex/Tests/ControllerTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Controller
;
use
Silex\Route
;
...
...
@@ -19,7 +20,7 @@ use Silex\Route;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
ControllerTest
extends
\PHPUnit_Framework_
TestCase
class
ControllerTest
extends
TestCase
{
public
function
testBind
()
{
...
...
tests/Silex/Tests/EventListener/LogListenerTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\EventListener
;
use
PHPUnit\Framework\TestCase
;
use
Psr\Log\LogLevel
;
use
Silex\EventListener\LogListener
;
use
Symfony\Component\HttpKernel\Event\GetResponseEvent
;
...
...
@@ -28,7 +29,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
*
* @author Jérôme Tamarelle <jerome@tamarelle.net>
*/
class
LogListenerTest
extends
\PHPUnit_Framework_
TestCase
class
LogListenerTest
extends
TestCase
{
public
function
testRequestListener
()
{
...
...
tests/Silex/Tests/ExceptionHandlerTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Response
;
...
...
@@ -21,7 +22,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
ExceptionHandlerTest
extends
\PHPUnit_Framework_
TestCase
class
ExceptionHandlerTest
extends
TestCase
{
public
function
testExceptionHandlerExceptionNoDebug
()
{
...
...
@@ -307,7 +308,6 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
// Since we throw a standard Exception above only
// the second error handler should fire
$app
->
error
(
function
(
\LogicException
$e
)
{
// Extends \Exception
return
'Caught LogicException'
;
});
$app
->
error
(
function
(
\Exception
$e
)
{
...
...
@@ -333,7 +333,6 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
// Since we throw a LogicException above
// the first error handler should fire
$app
->
error
(
function
(
\LogicException
$e
)
{
// Extends \Exception
return
'Caught LogicException'
;
});
$app
->
error
(
function
(
\Exception
$e
)
{
...
...
@@ -364,7 +363,6 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
return
'Caught Exception'
;
});
$app
->
error
(
function
(
\LogicException
$e
)
{
// Extends \Exception
return
'Caught LogicException'
;
});
...
...
tests/Silex/Tests/FunctionalTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Route
;
use
Silex\ControllerCollection
;
...
...
@@ -22,7 +23,7 @@ use Symfony\Component\HttpFoundation\Response;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
FunctionalTest
extends
\PHPUnit_Framework_
TestCase
class
FunctionalTest
extends
TestCase
{
public
function
testBind
()
{
...
...
tests/Silex/Tests/JsonTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
/**
...
...
@@ -18,7 +19,7 @@ use Silex\Application;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
JsonTest
extends
\PHPUnit_Framework_
TestCase
class
JsonTest
extends
TestCase
{
public
function
testJsonReturnsJsonResponse
()
{
...
...
tests/Silex/Tests/LazyDispatcherTest.php
View file @
f8731dad
...
...
@@ -11,10 +11,11 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
class
LazyDispatcherTest
extends
\PHPUnit_Framework_
TestCase
class
LazyDispatcherTest
extends
TestCase
{
/** @test */
public
function
beforeMiddlewareShouldNotCreateDispatcherEarly
()
...
...
tests/Silex/Tests/LazyRequestMatcherTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Symfony\Component\HttpFoundation\Request
;
use
Silex\Provider\Routing\LazyRequestMatcher
;
...
...
@@ -19,10 +20,10 @@ use Silex\Provider\Routing\LazyRequestMatcher;
*
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
*/
class
LazyRequestMatcherTest
extends
\PHPUnit_Framework_
TestCase
class
LazyRequestMatcherTest
extends
TestCase
{
/**
* @covers Silex\LazyRequestMatcher::getRequestMatcher
* @covers
\
Silex\LazyRequestMatcher::getRequestMatcher
*/
public
function
testUserMatcherIsCreatedLazily
()
{
...
...
@@ -42,7 +43,7 @@ class LazyRequestMatcherTest extends \PHPUnit_Framework_TestCase
}
/**
* @expectedException LogicException
* @expectedException
\
LogicException
* @expectedExceptionMessage Factory supplied to LazyRequestMatcher must return implementation of Symfony\Component\Routing\RequestMatcherInterface.
*/
public
function
testThatCanInjectRequestMatcherOnly
()
...
...
@@ -56,7 +57,7 @@ class LazyRequestMatcherTest extends \PHPUnit_Framework_TestCase
}
/**
* @covers Silex\LazyRequestMatcher::matchRequest
* @covers
\
Silex\LazyRequestMatcher::matchRequest
*/
public
function
testMatchIsProxy
()
{
...
...
tests/Silex/Tests/LocaleTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\LocaleServiceProvider
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -21,7 +22,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
LocaleTest
extends
\PHPUnit_Framework_
TestCase
class
LocaleTest
extends
TestCase
{
public
function
testLocale
()
{
...
...
tests/Silex/Tests/MiddlewareTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Response
;
...
...
@@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
MiddlewareTest
extends
\PHPUnit_Framework_
TestCase
class
MiddlewareTest
extends
TestCase
{
public
function
testBeforeAndAfterFilter
()
{
...
...
tests/Silex/Tests/Provider/AssetServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,10 +11,11 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\AssetServiceProvider
;
class
AssetServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
AssetServiceProviderTest
extends
TestCase
{
public
function
testGenerateAssetUrl
()
{
...
...
tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Pimple\Container
;
use
Silex\Application
;
use
Silex\Provider\DoctrineServiceProvider
;
...
...
@@ -20,7 +21,7 @@ use Silex\Provider\DoctrineServiceProvider;
*
* Fabien Potencier <fabien@symfony.com>
*/
class
DoctrineServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
DoctrineServiceProviderTest
extends
TestCase
{
public
function
testOptionsInitializer
()
{
...
...
@@ -43,7 +44,7 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase
$db
=
$app
[
'db'
];
$params
=
$db
->
getParams
();
$this
->
assert
True
(
array_key_exists
(
'memory'
,
$params
)
);
$this
->
assert
ArrayHasKey
(
'memory'
,
$params
);
$this
->
assertTrue
(
$params
[
'memory'
]);
$this
->
assertInstanceof
(
'Doctrine\DBAL\Driver\PDOSqlite\Driver'
,
$db
->
getDriver
());
$this
->
assertEquals
(
22
,
$app
[
'db'
]
->
fetchColumn
(
'SELECT 22'
));
...
...
@@ -67,7 +68,7 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase
$db
=
$app
[
'db'
];
$params
=
$db
->
getParams
();
$this
->
assert
True
(
array_key_exists
(
'memory'
,
$params
)
);
$this
->
assert
ArrayHasKey
(
'memory'
,
$params
);
$this
->
assertTrue
(
$params
[
'memory'
]);
$this
->
assertInstanceof
(
'Doctrine\DBAL\Driver\PDOSqlite\Driver'
,
$db
->
getDriver
());
$this
->
assertEquals
(
22
,
$app
[
'db'
]
->
fetchColumn
(
'SELECT 22'
));
...
...
@@ -76,7 +77,7 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase
$db2
=
$app
[
'dbs'
][
'sqlite2'
];
$params
=
$db2
->
getParams
();
$this
->
assert
True
(
array_key_exists
(
'path'
,
$params
)
);
$this
->
assert
ArrayHasKey
(
'path'
,
$params
);
$this
->
assertEquals
(
sys_get_temp_dir
()
.
'/silex'
,
$params
[
'path'
]);
}
...
...
tests/Silex/Tests/Provider/FormServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\FormServiceProvider
;
use
Silex\Provider\CsrfServiceProvider
;
...
...
@@ -25,7 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use
Symfony\Component\OptionsResolver\OptionsResolverInterface
;
use
Symfony\Component\Translation\Exception\NotFoundResourceException
;
class
FormServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
FormServiceProviderTest
extends
TestCase
{
public
function
testFormFactoryServiceIsFormFactory
()
{
...
...
tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\HttpCacheServiceProvider
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -21,7 +22,7 @@ use Symfony\Component\HttpFoundation\Response;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
HttpCacheServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
HttpCacheServiceProviderTest
extends
TestCase
{
public
function
testRegister
()
{
...
...
tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,13 +11,14 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\HttpCacheServiceProvider
;
use
Silex\Provider\HttpFragmentServiceProvider
;
use
Silex\Provider\TwigServiceProvider
;
use
Symfony\Component\HttpFoundation\Request
;
class
HttpFragmentServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
HttpFragmentServiceProviderTest
extends
TestCase
{
public
function
testRenderFunction
()
{
...
...
tests/Silex/Tests/Provider/MonologServiceProviderTest.php
View file @
f8731dad
...
...
@@ -14,6 +14,7 @@ namespace Silex\Tests\Provider;
use
Monolog\Formatter\JsonFormatter
;
use
Monolog\Handler\TestHandler
;
use
Monolog\Logger
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\MonologServiceProvider
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
...
...
@@ -26,7 +27,7 @@ use Symfony\Component\HttpKernel\Kernel;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
MonologServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
MonologServiceProviderTest
extends
TestCase
{
private
$currErrorHandler
;
...
...
tests/Silex/Tests/Provider/RoutingServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Pimple\Container
;
use
Silex\Application
;
use
Silex\Provider\RoutingServiceProvider
;
...
...
@@ -22,7 +23,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
RoutingServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
RoutingServiceProviderTest
extends
TestCase
{
public
function
testRegister
()
{
...
...
tests/Silex/Tests/Provider/SerializerServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\SerializerServiceProvider
;
...
...
@@ -19,7 +20,7 @@ use Silex\Provider\SerializerServiceProvider;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
SerializerServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
SerializerServiceProviderTest
extends
TestCase
{
public
function
testRegister
()
{
...
...
tests/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,11 +11,12 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\SwiftmailerServiceProvider
;
use
Symfony\Component\HttpFoundation\Request
;
class
SwiftmailerServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
SwiftmailerServiceProviderTest
extends
TestCase
{
public
function
testSwiftMailerServiceIsSwiftMailer
()
{
...
...
tests/Silex/Tests/Provider/TranslationServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\TranslationServiceProvider
;
use
Silex\Provider\LocaleServiceProvider
;
...
...
@@ -22,7 +23,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
*
* @author Daniel Tschinder <daniel@tschinder.de>
*/
class
TranslationServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
TranslationServiceProviderTest
extends
TestCase
{
/**
* @return Application
...
...
tests/Silex/Tests/Provider/TwigServiceProviderTest.php
View file @
f8731dad
...
...
@@ -12,6 +12,7 @@
namespace
Silex\Tests\Provider
;
use
Fig\Link\Link
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\CsrfServiceProvider
;
use
Silex\Provider\FormServiceProvider
;
...
...
@@ -25,7 +26,7 @@ use Symfony\Component\HttpFoundation\Request;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
TwigServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
TwigServiceProviderTest
extends
TestCase
{
public
function
testRegisterAndRender
()
{
...
...
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Provider
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\TranslationServiceProvider
;
use
Silex\Provider\ValidatorServiceProvider
;
...
...
@@ -27,7 +28,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
*
* Javier Lopez <f12loalf@gmail.com>
*/
class
ValidatorServiceProviderTest
extends
\PHPUnit_Framework_
TestCase
class
ValidatorServiceProviderTest
extends
TestCase
{
public
function
testRegister
()
{
...
...
tests/Silex/Tests/Route/SecurityTraitTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests\Route
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Silex\Provider\SecurityServiceProvider
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class
SecurityTraitTest
extends
\PHPUnit_Framework_
TestCase
class
SecurityTraitTest
extends
TestCase
{
public
function
testSecureWithNoAuthenticatedUser
()
{
...
...
tests/Silex/Tests/RouterTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Response
;
...
...
@@ -21,7 +22,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
RouterTest
extends
\PHPUnit_Framework_
TestCase
class
RouterTest
extends
TestCase
{
public
function
testMapRouting
()
{
...
...
tests/Silex/Tests/ServiceControllerResolverTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\ServiceControllerResolver
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -19,7 +20,7 @@ use Symfony\Component\HttpFoundation\Request;
* Unit tests for ServiceControllerResolver, see ServiceControllerResolverRouterTest for some
* integration tests.
*/
class
ServiceControllerResolverTest
extends
\PHPUnit_Framework_
Testcase
class
ServiceControllerResolverTest
extends
Testcase
{
private
$app
;
private
$mockCallbackResolver
;
...
...
tests/Silex/Tests/StreamTest.php
View file @
f8731dad
...
...
@@ -11,6 +11,7 @@
namespace
Silex\Tests
;
use
PHPUnit\Framework\TestCase
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -19,7 +20,7 @@ use Symfony\Component\HttpFoundation\Request;
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
StreamTest
extends
\PHPUnit_Framework_
TestCase
class
StreamTest
extends
TestCase
{
public
function
testStreamReturnsStreamingResponse
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment