Commit fbb5a69d authored by Igor Wiedler's avatar Igor Wiedler

use $app in tests, minor CS fixes

parent a085d9e2
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
namespace Silex; namespace Silex;
use Silex\Exception\ControllerFrozenException; use Silex\Exception\ControllerFrozenException;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
/** /**
......
...@@ -13,6 +13,7 @@ namespace Silex\Extension; ...@@ -13,6 +13,7 @@ namespace Silex\Extension;
use Silex\Application; use Silex\Application;
use Silex\ExtensionInterface; use Silex\ExtensionInterface;
use Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage; use Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session; use Symfony\Component\HttpFoundation\Session;
use Symfony\Component\HttpKernel\Events as HttpKernelEvents; use Symfony\Component\HttpKernel\Events as HttpKernelEvents;
......
...@@ -13,6 +13,7 @@ namespace Silex\Extension; ...@@ -13,6 +13,7 @@ namespace Silex\Extension;
use Silex\Application; use Silex\Application;
use Silex\ExtensionInterface; use Silex\ExtensionInterface;
use Symfony\Bridge\Twig\Extension\RoutingExtension; use Symfony\Bridge\Twig\Extension\RoutingExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
namespace Silex\Tests; namespace Silex\Tests;
use Silex\Application; use Silex\Application;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
...@@ -23,64 +24,64 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase ...@@ -23,64 +24,64 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
{ {
public function testMatchReturnValue() public function testMatchReturnValue()
{ {
$application = new Application(); $app = new Application();
$returnValue = $application->match('/foo', function() {}); $returnValue = $app->match('/foo', function() {});
$this->assertInstanceOf('Silex\Controller', $returnValue); $this->assertInstanceOf('Silex\Controller', $returnValue);
$returnValue = $application->get('/foo', function() {}); $returnValue = $app->get('/foo', function() {});
$this->assertInstanceOf('Silex\Controller', $returnValue); $this->assertInstanceOf('Silex\Controller', $returnValue);
$returnValue = $application->post('/foo', function() {}); $returnValue = $app->post('/foo', function() {});
$this->assertInstanceOf('Silex\Controller', $returnValue); $this->assertInstanceOf('Silex\Controller', $returnValue);
$returnValue = $application->put('/foo', function() {}); $returnValue = $app->put('/foo', function() {});
$this->assertInstanceOf('Silex\Controller', $returnValue); $this->assertInstanceOf('Silex\Controller', $returnValue);
$returnValue = $application->delete('/foo', function() {}); $returnValue = $app->delete('/foo', function() {});
$this->assertInstanceOf('Silex\Controller', $returnValue); $this->assertInstanceOf('Silex\Controller', $returnValue);
} }
public function testGetRequest() public function testGetRequest()
{ {
$application = new Application(); $app = new Application();
$application->get('/', function() { $app->get('/', function() {
return 'root'; return 'root';
}); });
$request = Request::create('/'); $request = Request::create('/');
$application->handle($request); $app->handle($request);
$this->assertEquals($request, $application['request']); $this->assertEquals($request, $app['request']);
} }
public function testgetRoutesWithNoRoutes() public function testgetRoutesWithNoRoutes()
{ {
$application = new Application(); $app = new Application();
$routes = $application['routes']; $routes = $app['routes'];
$this->assertInstanceOf('Symfony\Component\Routing\RouteCollection', $routes); $this->assertInstanceOf('Symfony\Component\Routing\RouteCollection', $routes);
$this->assertEquals(0, count($routes->all())); $this->assertEquals(0, count($routes->all()));
} }
public function testgetRoutesWithRoutes() public function testgetRoutesWithRoutes()
{ {
$application = new Application(); $app = new Application();
$application->get('/foo', function() { $app->get('/foo', function() {
return 'foo'; return 'foo';
}); });
$application->get('/bar', function() { $app->get('/bar', function() {
return 'bar'; return 'bar';
}); });
$routes = $application['routes']; $routes = $app['routes'];
$this->assertInstanceOf('Symfony\Component\Routing\RouteCollection', $routes); $this->assertInstanceOf('Symfony\Component\Routing\RouteCollection', $routes);
$this->assertEquals(0, count($routes->all())); $this->assertEquals(0, count($routes->all()));
$application->flush(); $app->flush();
$this->assertEquals(2, count($routes->all())); $this->assertEquals(2, count($routes->all()));
} }
} }
...@@ -29,25 +29,25 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase ...@@ -29,25 +29,25 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase
$i = 0; $i = 0;
$test = $this; $test = $this;
$application = new Application(); $app = new Application();
$application->before(function() use(&$i, $test) { $app->before(function() use (&$i, $test) {
$test->assertEquals(0, $i); $test->assertEquals(0, $i);
$i++; $i++;
}); });
$application->match('/foo', function() use(&$i, $test) { $app->match('/foo', function() use (&$i, $test) {
$test->assertEquals(1, $i); $test->assertEquals(1, $i);
$i++; $i++;
}); });
$application->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');
$application->handle($request); $app->handle($request);
$this->assertEquals(3, $i); $this->assertEquals(3, $i);
} }
...@@ -56,19 +56,19 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase ...@@ -56,19 +56,19 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase
{ {
$i = 0; $i = 0;
$application = new Application(); $app = new Application();
$application->match('/foo', function() use (&$i) { $app->match('/foo', function() use (&$i) {
$i++; $i++;
return new Response('foo'); return new Response('foo');
}); });
$application->after(function() use(&$i) { $app->after(function() use (&$i) {
$i++; $i++;
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
$application->handle($request); $app->handle($request);
$this->assertEquals(2, $i); $this->assertEquals(2, $i);
} }
...@@ -78,35 +78,35 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase ...@@ -78,35 +78,35 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase
$i = 0; $i = 0;
$test = $this; $test = $this;
$application = new Application(); $app = new Application();
$application->before(function() use(&$i, $test) { $app->before(function() use (&$i, $test) {
$test->assertEquals(0, $i); $test->assertEquals(0, $i);
$i++; $i++;
}); });
$application->before(function() use(&$i, $test) { $app->before(function() use (&$i, $test) {
$test->assertEquals(1, $i); $test->assertEquals(1, $i);
$i++; $i++;
}); });
$application->match('/foo', function() use(&$i, $test) { $app->match('/foo', function() use (&$i, $test) {
$test->assertEquals(2, $i); $test->assertEquals(2, $i);
$i++; $i++;
}); });
$application->after(function() use(&$i, $test) { $app->after(function() use (&$i, $test) {
$test->assertEquals(3, $i); $test->assertEquals(3, $i);
$i++; $i++;
}); });
$application->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');
$application->handle($request); $app->handle($request);
$this->assertEquals(5, $i); $this->assertEquals(5, $i);
} }
...@@ -115,26 +115,26 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase ...@@ -115,26 +115,26 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase
{ {
$i = 0; $i = 0;
$application = new Application(); $app = new Application();
$application->before(function() use(&$i) { $app->before(function() use (&$i) {
$i++; $i++;
}); });
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException(); throw new \RuntimeException();
}); });
$application->after(function() use(&$i) { $app->after(function() use (&$i) {
$i++; $i++;
}); });
$application->error(function() { $app->error(function() {
return 'error handled'; return 'error handled';
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
$application->handle($request); $app->handle($request);
$this->assertEquals(2, $i); $this->assertEquals(2, $i);
} }
...@@ -143,22 +143,22 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase ...@@ -143,22 +143,22 @@ class BeforeAfterFilterTest extends \PHPUnit_Framework_TestCase
{ {
$i = 0; $i = 0;
$application = new Application(); $app = new Application();
$application->before(function() use(&$i) { $app->before(function() use (&$i) {
$i++; $i++;
}); });
$application->after(function() use(&$i) { $app->after(function() use (&$i) {
$i++; $i++;
}); });
$application->error(function() { $app->error(function() {
return 'error handled'; return 'error handled';
}); });
$request = Request::create('/nowhere'); $request = Request::create('/nowhere');
$application->handle($request); $app->handle($request);
$this->assertEquals(2, $i); $this->assertEquals(2, $i);
} }
......
...@@ -15,6 +15,7 @@ use Silex\Application; ...@@ -15,6 +15,7 @@ use Silex\Application;
use Silex\Controller; use Silex\Controller;
use Silex\ControllerCollection; use Silex\ControllerCollection;
use Silex\Exception\ControllerFrozenException; use Silex\Exception\ControllerFrozenException;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouteCollection;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
namespace Silex\Tests; namespace Silex\Tests;
use Silex\Controller; use Silex\Controller;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
/** /**
......
...@@ -25,15 +25,15 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase ...@@ -25,15 +25,15 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
{ {
public function testNoErrorHandler() public function testNoErrorHandler()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException('foo exception'); throw new \RuntimeException('foo exception');
}); });
try { try {
$request = Request::create('/foo'); $request = Request::create('/foo');
$application->handle($request); $app->handle($request);
$this->fail('->handle() should not catch exceptions where no error handler was supplied'); $this->fail('->handle() should not catch exceptions where no error handler was supplied');
} catch (\RuntimeException $e) { } catch (\RuntimeException $e) {
$this->assertEquals('foo exception', $e->getMessage()); $this->assertEquals('foo exception', $e->getMessage());
...@@ -42,71 +42,71 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase ...@@ -42,71 +42,71 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
public function testOneErrorHandler() public function testOneErrorHandler()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException('foo exception'); throw new \RuntimeException('foo exception');
}); });
$application->error(function($e) { $app->error(function($e) {
return new Response('foo exception handler'); return new Response('foo exception handler');
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
$this->checkRouteResponse($application, '/foo', 'foo exception handler'); $this->checkRouteResponse($app, '/foo', 'foo exception handler');
} }
public function testMultipleErrorHandlers() public function testMultipleErrorHandlers()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException('foo exception'); throw new \RuntimeException('foo exception');
}); });
$errors = 0; $errors = 0;
$application->error(function($e) use (&$errors) { $app->error(function($e) use (&$errors) {
$errors++; $errors++;
}); });
$application->error(function($e) use (&$errors) { $app->error(function($e) use (&$errors) {
$errors++; $errors++;
}); });
$application->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');
}); });
$application->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');
$this->checkRouteResponse($application, '/foo', 'foo exception handler', 'should return the first response returned by an exception handler'); $this->checkRouteResponse($app, '/foo', 'foo exception handler', 'should return the first response returned by an exception handler');
$this->assertEquals(3, $errors, 'should execute error handlers until a response is returned'); $this->assertEquals(3, $errors, 'should execute error handlers until a response is returned');
} }
public function testNoResponseErrorHandler() public function testNoResponseErrorHandler()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException('foo exception'); throw new \RuntimeException('foo exception');
}); });
$errors = 0; $errors = 0;
$application->error(function($e) use (&$errors) { $app->error(function($e) use (&$errors) {
$errors++; $errors++;
}); });
try { try {
$request = Request::create('/foo'); $request = Request::create('/foo');
$application->handle($request); $app->handle($request);
$this->fail('->handle() should not catch exceptions where an empty error handler was supplied'); $this->fail('->handle() should not catch exceptions where an empty error handler was supplied');
} catch (\RuntimeException $e) { } catch (\RuntimeException $e) {
$this->assertEquals('foo exception', $e->getMessage()); $this->assertEquals('foo exception', $e->getMessage());
...@@ -117,45 +117,45 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase ...@@ -117,45 +117,45 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
public function testStringResponseErrorHandler() public function testStringResponseErrorHandler()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException('foo exception'); throw new \RuntimeException('foo exception');
}); });
$application->error(function($e) { $app->error(function($e) {
return 'foo exception handler'; return 'foo exception handler';
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
$this->checkRouteResponse($application, '/foo', 'foo exception handler', 'should accept a string response from the error handler'); $this->checkRouteResponse($app, '/foo', 'foo exception handler', 'should accept a string response from the error handler');
} }
public function testErrorHandlerException() public function testErrorHandlerException()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
throw new \RuntimeException('foo exception'); throw new \RuntimeException('foo exception');
}); });
$application->error(function($e) { $app->error(function($e) {
throw new \RuntimeException('foo exception handler exception'); throw new \RuntimeException('foo exception handler exception');
}); });
try { try {
$request = Request::create('/foo'); $request = Request::create('/foo');
$this->checkRouteResponse($application, '/foo', 'foo exception handler', 'should accept a string response from the error handler'); $this->checkRouteResponse($app, '/foo', 'foo exception handler', 'should accept a string response from the error handler');
$this->fail('->handle() should not catch exceptions thrown from an error handler'); $this->fail('->handle() should not catch exceptions thrown from an error handler');
} catch (\RuntimeException $e) { } catch (\RuntimeException $e) {
$this->assertEquals('foo exception handler exception', $e->getMessage()); $this->assertEquals('foo exception handler exception', $e->getMessage());
} }
} }
protected function checkRouteResponse($application, $path, $expectedContent, $method = 'get', $message = null) protected function checkRouteResponse($app, $path, $expectedContent, $method = 'get', $message = null)
{ {
$request = Request::create($path, $method); $request = Request::create($path, $method);
$response = $application->handle($request); $response = $app->handle($request);
$this->assertEquals($expectedContent, $response->getContent(), $message); $this->assertEquals($expectedContent, $response->getContent(), $message);
} }
} }
...@@ -22,20 +22,20 @@ class FunctionalTest extends \PHPUnit_Framework_TestCase ...@@ -22,20 +22,20 @@ class FunctionalTest extends \PHPUnit_Framework_TestCase
{ {
public function testBind() public function testBind()
{ {
$application = new Application(); $app = new Application();
$application->get('/', function() { $app->get('/', function() {
return 'hello'; return 'hello';
}) })
->bind('homepage'); ->bind('homepage');
$application->get('/foo', function() { $app->get('/foo', function() {
return 'foo'; return 'foo';
}) })
->bind('foo_abc'); ->bind('foo_abc');
$application->flush(); $app->flush();
$routes = $application['routes']; $routes = $app['routes'];
$this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('homepage')); $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('homepage'));
$this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('foo_abc')); $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('foo_abc'));
} }
......
...@@ -27,72 +27,72 @@ class RouterTest extends \PHPUnit_Framework_TestCase ...@@ -27,72 +27,72 @@ class RouterTest extends \PHPUnit_Framework_TestCase
{ {
public function testMapRouting() public function testMapRouting()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
return 'foo'; return 'foo';
}); });
$application->match('/bar', function() { $app->match('/bar', function() {
return 'bar'; return 'bar';
}); });
$application->match('/', function() { $app->match('/', function() {
return 'root'; return 'root';
}); });
$this->checkRouteResponse($application, '/foo', 'foo'); $this->checkRouteResponse($app, '/foo', 'foo');
$this->checkRouteResponse($application, '/bar', 'bar'); $this->checkRouteResponse($app, '/bar', 'bar');
$this->checkRouteResponse($application, '/', 'root'); $this->checkRouteResponse($app, '/', 'root');
} }
public function testStatusCode() public function testStatusCode()
{ {
$application = new Application(); $app = new Application();
$application->put('/created', function() { $app->put('/created', function() {
return new Response('', 201); return new Response('', 201);
}); });
$application->match('/forbidden', function() { $app->match('/forbidden', function() {
return new Response('', 403); return new Response('', 403);
}); });
$application->match('/not_found', function() { $app->match('/not_found', function() {
return new Response('', 404); return new Response('', 404);
}); });
$request = Request::create('/created', 'put'); $request = Request::create('/created', 'put');
$response = $application->handle($request); $response = $app->handle($request);
$this->assertEquals(201, $response->getStatusCode()); $this->assertEquals(201, $response->getStatusCode());
$request = Request::create('/forbidden'); $request = Request::create('/forbidden');
$response = $application->handle($request); $response = $app->handle($request);
$this->assertEquals(403, $response->getStatusCode()); $this->assertEquals(403, $response->getStatusCode());
$request = Request::create('/not_found'); $request = Request::create('/not_found');
$response = $application->handle($request); $response = $app->handle($request);
$this->assertEquals(404, $response->getStatusCode()); $this->assertEquals(404, $response->getStatusCode());
} }
public function testRedirect() public function testRedirect()
{ {
$application = new Application(); $app = new Application();
$application->match('/redirect', function() { $app->match('/redirect', function() {
return new RedirectResponse('/target'); return new RedirectResponse('/target');
}); });
$application->match('/redirect2', function() use ($application) { $app->match('/redirect2', function() use ($app) {
return $application->redirect('/target2'); return $app->redirect('/target2');
}); });
$request = Request::create('/redirect'); $request = Request::create('/redirect');
$response = $application->handle($request); $response = $app->handle($request);
$this->assertTrue($response->isRedirected('/target')); $this->assertTrue($response->isRedirected('/target'));
$request = Request::create('/redirect2'); $request = Request::create('/redirect2');
$response = $application->handle($request); $response = $app->handle($request);
$this->assertTrue($response->isRedirected('/target2')); $this->assertTrue($response->isRedirected('/target2'));
} }
...@@ -101,68 +101,68 @@ class RouterTest extends \PHPUnit_Framework_TestCase ...@@ -101,68 +101,68 @@ class RouterTest extends \PHPUnit_Framework_TestCase
*/ */
public function testMissingRoute() public function testMissingRoute()
{ {
$application = new Application(); $app = new Application();
$request = Request::create('/baz'); $request = Request::create('/baz');
$application->handle($request); $app->handle($request);
} }
public function testMethodRouting() public function testMethodRouting()
{ {
$application = new Application(); $app = new Application();
$application->match('/foo', function() { $app->match('/foo', function() {
return 'foo'; return 'foo';
}); });
$application->match('/bar', function() { $app->match('/bar', function() {
return 'bar'; return 'bar';
}, 'GET|POST'); }, 'GET|POST');
$application->get('/resource', function() { $app->get('/resource', function() {
return 'get resource'; return 'get resource';
}); });
$application->post('/resource', function() { $app->post('/resource', function() {
return 'post resource'; return 'post resource';
}); });
$application->put('/resource', function() { $app->put('/resource', function() {
return 'put resource'; return 'put resource';
}); });
$application->delete('/resource', function() { $app->delete('/resource', function() {
return 'delete resource'; return 'delete resource';
}); });
$this->checkRouteResponse($application, '/foo', 'foo'); $this->checkRouteResponse($app, '/foo', 'foo');
$this->checkRouteResponse($application, '/bar', 'bar'); $this->checkRouteResponse($app, '/bar', 'bar');
$this->checkRouteResponse($application, '/bar', 'bar', 'post'); $this->checkRouteResponse($app, '/bar', 'bar', 'post');
$this->checkRouteResponse($application, '/resource', 'get resource'); $this->checkRouteResponse($app, '/resource', 'get resource');
$this->checkRouteResponse($application, '/resource', 'post resource', 'post'); $this->checkRouteResponse($app, '/resource', 'post resource', 'post');
$this->checkRouteResponse($application, '/resource', 'put resource', 'put'); $this->checkRouteResponse($app, '/resource', 'put resource', 'put');
$this->checkRouteResponse($application, '/resource', 'delete resource', 'delete'); $this->checkRouteResponse($app, '/resource', 'delete resource', 'delete');
} }
public function testRequestShouldBeStoredRegardlessOfRouting() { public function testRequestShouldBeStoredRegardlessOfRouting() {
$application = new Application(); $app = new Application();
$application->get('/foo', function() use ($application) { $app->get('/foo', function() use ($app) {
return new Response($application['request']->getRequestUri()); return new Response($app['request']->getRequestUri());
}); });
$application->error(function($e) use ($application) { $app->error(function($e) use ($app) {
return new Response($application['request']->getRequestUri()); return new Response($app['request']->getRequestUri());
}); });
foreach(array('/foo', '/bar') as $path) { foreach(array('/foo', '/bar') as $path) {
$request = Request::create($path); $request = Request::create($path);
$response = $application->handle($request); $response = $app->handle($request);
$this->assertContains($path, $response->getContent()); $this->assertContains($path, $response->getContent());
} }
} }
protected function checkRouteResponse($application, $path, $expectedContent, $method = 'get', $message = null) protected function checkRouteResponse($app, $path, $expectedContent, $method = 'get', $message = null)
{ {
$request = Request::create($path, $method); $request = Request::create($path, $method);
$response = $application->handle($request); $response = $app->handle($request);
$this->assertEquals($expectedContent, $response->getContent(), $message); $this->assertEquals($expectedContent, $response->getContent(), $message);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment