8000 [FrameworkBundle] move test methods to test case class by xabbuh · Pull Request #18283 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] move test methods to test case class #18283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,34 +181,6 @@ public function testIsCsrfTokenValid()

$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()
{
Expand Down Expand Up @@ -328,3 +300,31 @@ public function testGetDoctrine()
$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);
}
}
0