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
da204f76
Commit
da204f76
authored
Nov 24, 2014
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some tests
parent
06d5555f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tests/Silex/Tests/CallbackServicesTest.php
tests/Silex/Tests/CallbackServicesTest.php
+3
-1
No files found.
tests/Silex/Tests/CallbackServicesTest.php
View file @
da204f76
...
@@ -14,6 +14,7 @@ namespace Silex\Tests;
...
@@ -14,6 +14,7 @@ namespace Silex\Tests;
use
Silex\Application
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpFoundation\Response
;
use
Silex\Provider\ServiceControllerServiceProvider
;
/**
/**
* Callback as services test cases.
* Callback as services test cases.
...
@@ -27,6 +28,7 @@ class CallbackServicesTest extends \PHPUnit_Framework_TestCase
...
@@ -27,6 +28,7 @@ class CallbackServicesTest extends \PHPUnit_Framework_TestCase
public
function
testCallbacksAsServices
()
public
function
testCallbacksAsServices
()
{
{
$app
=
new
Application
();
$app
=
new
Application
();
$app
->
register
(
new
ServiceControllerServiceProvider
());
$app
[
'service'
]
=
$app
->
share
(
function
()
{
$app
[
'service'
]
=
$app
->
share
(
function
()
{
return
new
self
();
return
new
self
();
...
@@ -50,10 +52,10 @@ class CallbackServicesTest extends \PHPUnit_Framework_TestCase
...
@@ -50,10 +52,10 @@ class CallbackServicesTest extends \PHPUnit_Framework_TestCase
$app
->
terminate
(
$request
,
$response
);
$app
->
terminate
(
$request
,
$response
);
$this
->
assertEquals
(
array
(
$this
->
assertEquals
(
array
(
'CONVERT'
,
'BEFORE APP'
,
'BEFORE APP'
,
'ON REQUEST'
,
'ON REQUEST'
,
'BEFORE'
,
'BEFORE'
,
'CONVERT'
,
'ERROR'
,
'ERROR'
,
'AFTER'
,
'AFTER'
,
'AFTER APP'
,
'AFTER APP'
,
...
...
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