File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/Symfony/Bundle/FrameworkBundle/Tests/Test Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 23
23
use Symfony \Component \HttpFoundation \Cookie as HttpFoundationCookie ;
24
24
use Symfony \Component \HttpFoundation \Request ;
25
25
use Symfony \Component \HttpFoundation \Response ;
26
+ use Symfony \Component \HttpFoundation \Test \Constraint \ResponseFormatSame ;
26
27
27
28
class WebTestCaseTest extends TestCase
28
29
{
@@ -77,6 +78,10 @@ public function testAssertResponseRedirectsWithLocationAndStatusCode()
77
78
78
79
public function testAssertResponseFormat ()
79
80
{
81
+ if (!class_exists (ResponseFormatSame::class)) {
82
+ $ this ->markTestSkipped ('Too old version of HttpFoundation. ' );
83
+ }
84
+
80
85
$ this ->getResponseTester (new Response ('' , 200 , ['Content-Type ' => 'application/vnd.myformat ' ]))->assertResponseFormatSame ('custom ' );
81
86
$ this ->getResponseTester (new Response ('' , 200 , ['Content-Type ' => 'application/ld+json ' ]))->assertResponseFormatSame ('jsonld ' );
82
87
$ this ->expectException (AssertionFailedError::class);
You can’t perform that action at this time.
0 commit comments