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
a29f5770
Commit
a29f5770
authored
Mar 25, 2011
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add functional test for route setting
parent
971e581d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
tests/Silex/Tests/FunctionalTest.php
tests/Silex/Tests/FunctionalTest.php
+42
-0
No files found.
tests/Silex/Tests/FunctionalTest.php
0 → 100644
View file @
a29f5770
<?php
/*
* This file is part of the Silex framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace
Silex\Tests
;
use
Silex\Application
;
/**
* Controller test cases.
*
* @author Igor Wiedler <igor@wiedler.ch>
*/
class
FunctionalTest
extends
\PHPUnit_Framework_TestCase
{
public
function
testSetRouteName
()
{
$application
=
new
Application
();
$application
->
get
(
'/'
,
function
()
{
return
'hello'
;
})
->
setRouteName
(
'homepage'
);
$application
->
get
(
'/foo'
,
function
()
{
return
'foo'
;
})
->
setRouteName
(
'foo_abc'
);
$application
->
getControllerCollection
()
->
flush
();
$routeCollection
=
$application
->
getRouteCollection
();
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\Route'
,
$routeCollection
->
get
(
'homepage'
));
$this
->
assertInstanceOf
(
'Symfony\Component\Routing\Route'
,
$routeCollection
->
get
(
'foo_abc'
));
}
}
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