Skip to content

Commit e81bf1e

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Serializer] Fix CsvEncoder decode on empty data [Tests] Migrate data providers to static ones stop using assertObjectHasAttribute()/assertObjectHasNotAttribute() [Dotenv] Fix phpdoc Dotenv [Config] Fix phpdoc nullable Fix some typos
2 parents 8724f7d + 0a3de40 commit e81bf1e

File tree

4 files changed

+7
-30
lines changed

4 files changed

+7
-30
lines changed

HeaderUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static function quote(string $s): string
138138
* Decodes a quoted string.
139139
*
140140
* If passed an unquoted string that matches the "token" construct (as
141-
* defined in the HTTP specification), it is passed through verbatimly.
141+
* defined in the HTTP specification), it is passed through verbatim.
142142
*/
143143
public static function unquote(string $s): string
144144
{

Tests/RequestTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,10 +1687,7 @@ public function testGetSession()
16871687
$request->setSession(new Session(new MockArraySessionStorage()));
16881688
$this->assertTrue($request->hasSession());
16891689

1690-
$session = $request->getSession();
1691-
$this->assertObjectHasAttribute('storage', $session);
1692-
$this->assertObjectHasAttribute('flashName', $session);
1693-
$this->assertObjectHasAttribute('attributeName', $session);
1690+
$this->assertInstanceOf(Session::class, $request->getSession());
16941691
}
16951692

16961693
public function testHasPreviousSession()

Tests/ResponseTest.php

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,14 @@ public function testSendHeaders()
3939
{
4040
$response = new Response();
4141
$headers = $response->sendHeaders();
42-
$this->assertObjectHasAttribute('headers', $headers);
43-
$this->assertObjectHasAttribute('content', $headers);
44-
$this->assertObjectHasAttribute('version', $headers);
45-
$this->assertObjectHasAttribute('statusCode', $headers);
46-
$this->assertObjectHasAttribute('statusText', $headers);
47-
$this->assertObjectHasAttribute('charset', $headers);
42+
$this->assertSame($response, $headers);
4843
}
4944

5045
public function testSend()
5146
{
5247
$response = new Response();
53-
$responseSent = $response->send();
54-
$this->assertObjectHasAttribute('headers', $responseSent);
55-
$this->assertObjectHasAttribute('content', $responseSent);
56-
$this->assertObjectHasAttribute('version', $responseSent);
57-
$this->assertObjectHasAttribute('statusCode', $responseSent);
58-
$this->assertObjectHasAttribute('statusText', $responseSent);
59-
$this->assertObjectHasAttribute('charset', $responseSent);
48+
$responseSend = $response->send();
49+
$this->assertSame($response, $responseSend);
6050
}
6151

6252
public function testGetCharset()
@@ -120,12 +110,7 @@ public function testSetNotModified()
120110
{
121111
$response = new Response('foo');
122112
$modified = $response->setNotModified();
123-
$this->assertObjectHasAttribute('headers', $modified);
124-
$this->assertObjectHasAttribute('content', $modified);
125-
$this->assertObjectHasAttribute('version', $modified);
126-
$this->assertObjectHasAttribute('statusCode', $modified);
127-
$this->assertObjectHasAttribute('statusText', $modified);
128-
$this->assertObjectHasAttribute('charset', $modified);
113+
$this->assertSame($response, $modified);
129114
$this->assertEquals(304, $modified->getStatusCode());
130115

131116
ob_start();

Tests/StreamedResponseTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ public function testSetNotModified()
116116
{
117117
$response = new StreamedResponse(function () { echo 'foo'; });
118118
$modified = $response->setNotModified();
119-
$this->assertObjectHasAttribute('headers', $modified);
120-
$this->assertObjectHasAttribute('content', $modified);
121-
$this->assertObjectHasAttribute('version', $modified);
122-
$this->assertObjectHasAttribute('statusCode', $modified);
123-
$this->assertObjectHasAttribute('statusText', $modified);
124-
$this->assertObjectHasAttribute('charset', $modified);
119+
$this->assertSame($response, $modified);
125120
$this->assertEquals(304, $modified->getStatusCode());
126121

127122
ob_start();

0 commit comments

Comments
 (0)