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
8bd96879
Commit
8bd96879
authored
Aug 04, 2015
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed CS
parent
f4863ded
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
33 additions
and
33 deletions
+33
-33
src/Silex/Application.php
src/Silex/Application.php
+1
-1
tests/Silex/Tests/Application/SecurityTraitTest.php
tests/Silex/Tests/Application/SecurityTraitTest.php
+1
-1
tests/Silex/Tests/EventListener/LogListenerTest.php
tests/Silex/Tests/EventListener/LogListenerTest.php
+2
-2
tests/Silex/Tests/ExceptionHandlerTest.php
tests/Silex/Tests/ExceptionHandlerTest.php
+5
-5
tests/Silex/Tests/LazyUrlMatcherTest.php
tests/Silex/Tests/LazyUrlMatcherTest.php
+1
-1
tests/Silex/Tests/MiddlewareTest.php
tests/Silex/Tests/MiddlewareTest.php
+14
-14
tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php
.../Silex/Tests/Provider/HttpFragmentServiceProviderTest.php
+1
-1
tests/Silex/Tests/Provider/SecurityServiceProviderTest.php
tests/Silex/Tests/Provider/SecurityServiceProviderTest.php
+2
-2
tests/Silex/Tests/Provider/TwigServiceProviderTest.php
tests/Silex/Tests/Provider/TwigServiceProviderTest.php
+4
-4
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
+1
-1
tests/Silex/Tests/StreamTest.php
tests/Silex/Tests/StreamTest.php
+1
-1
No files found.
src/Silex/Application.php
View file @
8bd96879
...
@@ -89,7 +89,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
...
@@ -89,7 +89,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
$this
[
'dispatcher_class'
]
=
'Symfony\\Component\\EventDispatcher\\EventDispatcher'
;
$this
[
'dispatcher_class'
]
=
'Symfony\\Component\\EventDispatcher\\EventDispatcher'
;
$this
[
'dispatcher'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
$this
[
'dispatcher'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
/*
*
/*
* @var EventDispatcherInterface
* @var EventDispatcherInterface
*/
*/
$dispatcher
=
new
$app
[
'dispatcher_class'
]();
$dispatcher
=
new
$app
[
'dispatcher_class'
]();
...
...
tests/Silex/Tests/Application/SecurityTraitTest.php
View file @
8bd96879
tests/Silex/Tests/EventListener/LogListenerTest.php
View file @
8bd96879
...
@@ -73,13 +73,13 @@ class LogListenerTest extends \PHPUnit_Framework_TestCase
...
@@ -73,13 +73,13 @@ class LogListenerTest extends \PHPUnit_Framework_TestCase
$logger
$logger
->
expects
(
$this
->
once
())
->
expects
(
$this
->
once
())
->
method
(
'critical'
)
->
method
(
'critical'
)
->
with
(
$this
->
equalTo
(
'RuntimeException: Fatal error (uncaught exception) at '
.
__FILE__
.
' line '
.
(
__LINE__
+
14
)))
->
with
(
$this
->
equalTo
(
'RuntimeException: Fatal error (uncaught exception) at '
.
__FILE__
.
' line '
.
(
__LINE__
+
14
)))
;
;
$logger
$logger
->
expects
(
$this
->
once
())
->
expects
(
$this
->
once
())
->
method
(
'error'
)
->
method
(
'error'
)
->
with
(
$this
->
equalTo
(
'Symfony\Component\HttpKernel\Exception\HttpException: Http error (uncaught exception) at '
.
__FILE__
.
' line '
.
(
__LINE__
+
10
)))
->
with
(
$this
->
equalTo
(
'Symfony\Component\HttpKernel\Exception\HttpException: Http error (uncaught exception) at '
.
__FILE__
.
' line '
.
(
__LINE__
+
10
)))
;
;
$dispatcher
=
new
EventDispatcher
();
$dispatcher
=
new
EventDispatcher
();
...
...
tests/Silex/Tests/ExceptionHandlerTest.php
View file @
8bd96879
...
@@ -162,22 +162,22 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
...
@@ -162,22 +162,22 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$errors
=
0
;
$errors
=
0
;
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$errors
++
;
++
$errors
;
});
});
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$errors
++
;
++
$errors
;
});
});
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$errors
++
;
++
$errors
;
return
new
Response
(
'foo exception handler'
);
return
new
Response
(
'foo exception handler'
);
});
});
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
// should not execute
// should not execute
$errors
++
;
++
$errors
;
});
});
$request
=
Request
::
create
(
'/foo'
);
$request
=
Request
::
create
(
'/foo'
);
...
@@ -198,7 +198,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
...
@@ -198,7 +198,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$errors
=
0
;
$errors
=
0
;
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$app
->
error
(
function
(
$e
)
use
(
&
$errors
)
{
$errors
++
;
++
$errors
;
});
});
try
{
try
{
...
...
tests/Silex/Tests/LazyUrlMatcherTest.php
View file @
8bd96879
...
@@ -29,7 +29,7 @@ class LazyUrlMatcherTest extends \PHPUnit_Framework_TestCase
...
@@ -29,7 +29,7 @@ class LazyUrlMatcherTest extends \PHPUnit_Framework_TestCase
$urlMatcher
=
$this
->
getMock
(
'Symfony\Component\Routing\Matcher\UrlMatcherInterface'
);
$urlMatcher
=
$this
->
getMock
(
'Symfony\Component\Routing\Matcher\UrlMatcherInterface'
);
$matcher
=
new
LazyUrlMatcher
(
function
()
use
(
$urlMatcher
,
&
$callCounter
)
{
$matcher
=
new
LazyUrlMatcher
(
function
()
use
(
$urlMatcher
,
&
$callCounter
)
{
$callCounter
++
;
++
$callCounter
;
return
$urlMatcher
;
return
$urlMatcher
;
});
});
...
...
tests/Silex/Tests/MiddlewareTest.php
View file @
8bd96879
...
@@ -31,17 +31,17 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
...
@@ -31,17 +31,17 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app
->
before
(
function
()
use
(
&
$i
,
$test
)
{
$app
->
before
(
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
0
,
$i
);
$test
->
assertEquals
(
0
,
$i
);
$i
++
;
++
$i
;
});
});
$app
->
match
(
'/foo'
,
function
()
use
(
&
$i
,
$test
)
{
$app
->
match
(
'/foo'
,
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
1
,
$i
);
$test
->
assertEquals
(
1
,
$i
);
$i
++
;
++
$i
;
});
});
$app
->
after
(
function
()
use
(
&
$i
,
$test
)
{
$app
->
after
(
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
2
,
$i
);
$test
->
assertEquals
(
2
,
$i
);
$i
++
;
++
$i
;
});
});
$request
=
Request
::
create
(
'/foo'
);
$request
=
Request
::
create
(
'/foo'
);
...
@@ -57,13 +57,13 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
...
@@ -57,13 +57,13 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app
=
new
Application
();
$app
=
new
Application
();
$app
->
match
(
'/foo'
,
function
()
use
(
&
$i
)
{
$app
->
match
(
'/foo'
,
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
return
new
Response
(
'foo'
);
return
new
Response
(
'foo'
);
});
});
$app
->
after
(
function
()
use
(
&
$i
)
{
$app
->
after
(
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
});
});
$request
=
Request
::
create
(
'/foo'
);
$request
=
Request
::
create
(
'/foo'
);
...
@@ -81,27 +81,27 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
...
@@ -81,27 +81,27 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app
->
before
(
function
()
use
(
&
$i
,
$test
)
{
$app
->
before
(
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
0
,
$i
);
$test
->
assertEquals
(
0
,
$i
);
$i
++
;
++
$i
;
});
});
$app
->
before
(
function
()
use
(
&
$i
,
$test
)
{
$app
->
before
(
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
1
,
$i
);
$test
->
assertEquals
(
1
,
$i
);
$i
++
;
++
$i
;
});
});
$app
->
match
(
'/foo'
,
function
()
use
(
&
$i
,
$test
)
{
$app
->
match
(
'/foo'
,
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
2
,
$i
);
$test
->
assertEquals
(
2
,
$i
);
$i
++
;
++
$i
;
});
});
$app
->
after
(
function
()
use
(
&
$i
,
$test
)
{
$app
->
after
(
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
3
,
$i
);
$test
->
assertEquals
(
3
,
$i
);
$i
++
;
++
$i
;
});
});
$app
->
after
(
function
()
use
(
&
$i
,
$test
)
{
$app
->
after
(
function
()
use
(
&
$i
,
$test
)
{
$test
->
assertEquals
(
4
,
$i
);
$test
->
assertEquals
(
4
,
$i
);
$i
++
;
++
$i
;
});
});
$request
=
Request
::
create
(
'/foo'
);
$request
=
Request
::
create
(
'/foo'
);
...
@@ -117,7 +117,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
...
@@ -117,7 +117,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app
=
new
Application
();
$app
=
new
Application
();
$app
->
before
(
function
()
use
(
&
$i
)
{
$app
->
before
(
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
});
});
$app
->
match
(
'/foo'
,
function
()
{
$app
->
match
(
'/foo'
,
function
()
{
...
@@ -125,7 +125,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
...
@@ -125,7 +125,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
});
});
$app
->
after
(
function
()
use
(
&
$i
)
{
$app
->
after
(
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
});
});
$app
->
error
(
function
()
{
$app
->
error
(
function
()
{
...
@@ -145,11 +145,11 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
...
@@ -145,11 +145,11 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app
=
new
Application
();
$app
=
new
Application
();
$app
->
before
(
function
()
use
(
&
$i
)
{
$app
->
before
(
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
},
Application
::
EARLY_EVENT
);
},
Application
::
EARLY_EVENT
);
$app
->
after
(
function
()
use
(
&
$i
)
{
$app
->
after
(
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
});
});
$app
->
error
(
function
()
{
$app
->
error
(
function
()
{
...
...
tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php
View file @
8bd96879
tests/Silex/Tests/Provider/SecurityServiceProviderTest.php
View file @
8bd96879
tests/Silex/Tests/Provider/TwigServiceProviderTest.php
View file @
8bd96879
tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php
View file @
8bd96879
tests/Silex/Tests/StreamTest.php
View file @
8bd96879
...
@@ -35,7 +35,7 @@ class StreamTest extends \PHPUnit_Framework_TestCase
...
@@ -35,7 +35,7 @@ class StreamTest extends \PHPUnit_Framework_TestCase
$i
=
0
;
$i
=
0
;
$stream
=
function
()
use
(
&
$i
)
{
$stream
=
function
()
use
(
&
$i
)
{
$i
++
;
++
$i
;
};
};
$app
=
new
Application
();
$app
=
new
Application
();
...
...
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