minor #18283 [FrameworkBundle] move test methods to test case class (xabbuh)
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] move test methods to test case class
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
8188653
move test methods to test case class
This commit is contained in:
commit
bd6d9bb1c2
@ -181,34 +181,6 @@ class ControllerTest extends TestCase
|
|||||||
|
|
||||||
$this->assertTrue($controller->isCsrfTokenValid('foo', 'bar'));
|
$this->assertTrue($controller->isCsrfTokenValid('foo', 'bar'));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
class TestController extends Controller
|
|
||||||
{
|
|
||||||
public function forward($controller, array $path = array(), array $query = array())
|
|
||||||
{
|
|
||||||
return parent::forward($controller, $path, $query);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUser()
|
|
||||||
{
|
|
||||||
return parent::getUser();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function redirectToRoute($route, array $parameters = array(), $status = 302)
|
|
||||||
{
|
|
||||||
return parent::redirectToRoute($route, $parameters, $status);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addFlash($type, $message)
|
|
||||||
{
|
|
||||||
parent::addFlash($type, $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isCsrfTokenValid($id, $token)
|
|
||||||
{
|
|
||||||
return parent::isCsrfTokenValid($id, $token);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testGenerateUrl()
|
public function testGenerateUrl()
|
||||||
{
|
{
|
||||||
@ -328,3 +300,31 @@ class TestController extends Controller
|
|||||||
$this->assertEquals($doctrine, $controller->getDoctrine());
|
$this->assertEquals($doctrine, $controller->getDoctrine());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TestController extends Controller
|
||||||
|
{
|
||||||
|
public function forward($controller, array $path = array(), array $query = array())
|
||||||
|
{
|
||||||
|
return parent::forward($controller, $path, $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser()
|
||||||
|
{
|
||||||
|
return parent::getUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function redirectToRoute($route, array $parameters = array(), $status = 302)
|
||||||
|
{
|
||||||
|
return parent::redirectToRoute($route, $parameters, $status);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addFlash($type, $message)
|
||||||
|
{
|
||||||
|
parent::addFlash($type, $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isCsrfTokenValid($id, $token)
|
||||||
|
{
|
||||||
|
return parent::isCsrfTokenValid($id, $token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user