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
7bca79b5
Commit
7bca79b5
authored
May 26, 2016
by
Romain Neutron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests against Symfony 3.1
parent
ffcf8bae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
27 deletions
+36
-27
.travis.yml
.travis.yml
+5
-2
composer.json
composer.json
+24
-24
tests/Silex/Tests/Provider/MonologServiceProviderTest.php
tests/Silex/Tests/Provider/MonologServiceProviderTest.php
+7
-1
No files found.
.travis.yml
View file @
7bca79b5
...
@@ -12,8 +12,9 @@ before_install:
...
@@ -12,8 +12,9 @@ before_install:
before_script
:
before_script
:
# symfony/*
# symfony/*
-
sh -c "if [ '$TWIG_VERSION' != '2.0' ]; then sed -i 's/~1.8|~2.0/~1.8/g' composer.json; composer update; fi"
-
sh -c "if [ '$TWIG_VERSION' != '2.0' ]; then sed -i 's/~1.8|~2.0/~1.8/g' composer.json; composer update; fi"
-
sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.0' ]; then sed -i 's/~2\.8|3\.0\.\*/3.0.*@dev/g' composer.json; composer update; fi"
-
sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.0' ]; then sed -i 's/~2\.8|^3\.0/3.0.*@dev/g' composer.json; composer update; fi"
-
sh -c "if [ '$SYMFONY_DEPS_VERSION' = '' ]; then sed -i 's/~2\.8|3\.0\.\*/2.8.*@dev/g' composer.json; composer update; fi"
-
sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.1' ]; then sed -i 's/~2\.8|^3\.0/3.1.*@dev/g' composer.json; composer update; fi"
-
sh -c "if [ '$SYMFONY_DEPS_VERSION' = '' ]; then sed -i 's/~2\.8|^3\.0/2.8.*@dev/g' composer.json; composer update; fi"
-
composer install
-
composer install
script
:
phpunit
script
:
phpunit
...
@@ -25,5 +26,7 @@ matrix:
...
@@ -25,5 +26,7 @@ matrix:
env
:
TWIG_VERSION=2.0
env
:
TWIG_VERSION=2.0
-
php
:
5.6
-
php
:
5.6
env
:
SYMFONY_DEPS_VERSION=3.0
env
:
SYMFONY_DEPS_VERSION=3.0
-
php
:
5.6
env
:
SYMFONY_DEPS_VERSION=3.1
-
php
:
7.0
-
php
:
7.0
-
php
:
hhvm
-
php
:
hhvm
composer.json
View file @
7bca79b5
...
@@ -17,32 +17,32 @@
...
@@ -17,32 +17,32 @@
"require"
:
{
"require"
:
{
"php"
:
">=5.5.9"
,
"php"
:
">=5.5.9"
,
"
pimple/pimple
"
:
"
~3.0
"
,
"
pimple/pimple
"
:
"
~3.0
"
,
"
symfony/event-dispatcher
"
:
"
~2.8|
3.0.*
"
,
"
symfony/event-dispatcher
"
:
"
~2.8|
^3.0
"
,
"
symfony/http-foundation
"
:
"
~2.8|
3.0.*
"
,
"
symfony/http-foundation
"
:
"
~2.8|
^3.0
"
,
"
symfony/http-kernel
"
:
"
~2.8|
3.0.*
"
,
"
symfony/http-kernel
"
:
"
~2.8|
^3.0
"
,
"
symfony/routing
"
:
"
~2.8|
3.0.*
"
"
symfony/routing
"
:
"
~2.8|
^3.0
"
},
},
"require-dev"
:
{
"require-dev"
:
{
"
symfony/asset
"
:
"
~2.8|
3.0.*
"
,
"
symfony/asset
"
:
"
~2.8|
^3.0
"
,
"
symfony/expression-language
"
:
"
~2.8|
3.0.*
"
,
"
symfony/expression-language
"
:
"
~2.8|
^3.0
"
,
"
symfony/security
"
:
"
~2.8|
3.0.*
"
,
"
symfony/security
"
:
"
~2.8|
^3.0
"
,
"
symfony/config
"
:
"
~2.8|
3.0.*
"
,
"
symfony/config
"
:
"
~2.8|
^3.0
"
,
"
symfony/form
"
:
"
~2.8|
3.0.*
"
,
"
symfony/form
"
:
"
~2.8|
^3.0
"
,
"
symfony/browser-kit
"
:
"
~2.8|
3.0.*
"
,
"
symfony/browser-kit
"
:
"
~2.8|
^3.0
"
,
"
symfony/css-selector
"
:
"
~2.8|
3.0.*
"
,
"
symfony/css-selector
"
:
"
~2.8|
^3.0
"
,
"
symfony/debug
"
:
"
~2.8|
3.0.*
"
,
"
symfony/debug
"
:
"
~2.8|
^3.0
"
,
"
symfony/dom-crawler
"
:
"
~2.8|
3.0.*
"
,
"
symfony/dom-crawler
"
:
"
~2.8|
^3.0
"
,
"
symfony/finder
"
:
"
~2.8|
3.0.*
"
,
"
symfony/finder
"
:
"
~2.8|
^3.0
"
,
"
symfony/intl
"
:
"
~2.8|
3.0.*
"
,
"
symfony/intl
"
:
"
~2.8|
^3.0
"
,
"
symfony/monolog-bridge
"
:
"
~2.8|
3.0.*
"
,
"
symfony/monolog-bridge
"
:
"
~2.8|
^3.0
"
,
"
symfony/doctrine-bridge
"
:
"
~2.8|
3.0.*
"
,
"
symfony/doctrine-bridge
"
:
"
~2.8|
^3.0
"
,
"
symfony/options-resolver
"
:
"
~2.8|
3.0.*
"
,
"
symfony/options-resolver
"
:
"
~2.8|
^3.0
"
,
"
symfony/process
"
:
"
~2.8|
3.0.*
"
,
"
symfony/process
"
:
"
~2.8|
^3.0
"
,
"
symfony/serializer
"
:
"
~2.8|
3.0.*
"
,
"
symfony/serializer
"
:
"
~2.8|
^3.0
"
,
"
symfony/translation
"
:
"
~2.8|
3.0.*
"
,
"
symfony/translation
"
:
"
~2.8|
^3.0
"
,
"
symfony/twig-bridge
"
:
"
~2.8|
3.0.*
"
,
"
symfony/twig-bridge
"
:
"
~2.8|
^3.0
"
,
"
symfony/validator
"
:
"
~2.8|
3.0.*
"
,
"
symfony/validator
"
:
"
~2.8|
^3.0
"
,
"
symfony/var-dumper
"
:
"
~2.8|
3.0.*
"
,
"
symfony/var-dumper
"
:
"
~2.8|
^3.0
"
,
"
twig/twig
"
:
"
~1.8|~2.0
"
,
"
twig/twig
"
:
"
~1.8|~2.0
"
,
"
doctrine/dbal
"
:
"
~2.2
"
,
"
doctrine/dbal
"
:
"
~2.2
"
,
"
swiftmailer/swiftmailer
"
:
"
~5
"
,
"
swiftmailer/swiftmailer
"
:
"
~5
"
,
...
...
tests/Silex/Tests/Provider/MonologServiceProviderTest.php
View file @
7bca79b5
...
@@ -18,6 +18,7 @@ use Silex\Application;
...
@@ -18,6 +18,7 @@ use Silex\Application;
use
Silex\Provider\MonologServiceProvider
;
use
Silex\Provider\MonologServiceProvider
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpKernel\Kernel
;
/**
/**
* MonologProvider test cases.
* MonologProvider test cases.
...
@@ -43,7 +44,12 @@ class MonologServiceProviderTest extends \PHPUnit_Framework_TestCase
...
@@ -43,7 +44,12 @@ class MonologServiceProviderTest extends \PHPUnit_Framework_TestCase
$this
->
assertTrue
(
$app
[
'monolog.handler'
]
->
hasDebug
(
'< 200'
));
$this
->
assertTrue
(
$app
[
'monolog.handler'
]
->
hasDebug
(
'< 200'
));
$records
=
$app
[
'monolog.handler'
]
->
getRecords
();
$records
=
$app
[
'monolog.handler'
]
->
getRecords
();
$this
->
assertContains
(
'Matched route "GET_foo"'
,
$records
[
0
][
'message'
]);
if
(
version_compare
(
'3.1'
,
Kernel
::
VERSION
,
'>='
))
{
$this
->
assertContains
(
'Matched route "GET_foo"'
,
$records
[
0
][
'message'
]);
}
else
{
$this
->
assertContains
(
'Matched route "{route}".'
,
$records
[
0
][
'message'
]);
$this
->
assertSame
(
'GET_foo'
,
$records
[
0
][
'context'
][
'route'
]);
}
}
}
public
function
testManualLogging
()
public
function
testManualLogging
()
...
...
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