Skip to content

Commit 7c9f157

Browse files
Merge branch '5.0' into 5.1
* 5.0: fix merge Require PHPUnit 9.3 on PHP 8 [Cache] fix catching auth errors Fix CS [FrameworkBundle] set default session.handler alias if handler_id is not provided Fix CS Readability update Fix checks for phpunit releases on Composer 2 (resolves #37601) [Serializer] Support multiple levels of discriminator mapping Use hexadecimal numerals instead of hexadecimals in strings to represent error codes. [SCA] Minor fixes on tests [WebProfilerBundle] modified url generation to use absolute urls [Mailer] Fix reply-to functionality in the SendgridApiTransport [Mime] Fix compat with HTTP requests ticket_36879 - Fix mandrill raw http request setting from email/name
2 parents 5a5d397 + bc0390f commit 7c9f157

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Tests/ResponseTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,20 +620,20 @@ public function testSetCache()
620620

621621
$options = ['etag' => '"whatever"'];
622622
$response->setCache($options);
623-
$this->assertEquals($response->getEtag(), '"whatever"');
623+
$this->assertEquals('"whatever"', $response->getEtag());
624624

625625
$now = $this->createDateTimeNow();
626626
$options = ['last_modified' => $now];
627627
$response->setCache($options);
628-
$this->assertEquals($response->getLastModified()->getTimestamp(), $now->getTimestamp());
628+
$this->assertEquals($now->getTimestamp(), $response->getLastModified()->getTimestamp());
629629

630630
$options = ['max_age' => 100];
631631
$response->setCache($options);
632-
$this->assertEquals($response->getMaxAge(), 100);
632+
$this->assertEquals(100, $response->getMaxAge());
633633

634634
$options = ['s_maxage' => 200];
635635
$response->setCache($options);
636-
$this->assertEquals($response->getMaxAge(), 200);
636+
$this->assertEquals(200, $response->getMaxAge());
637637

638638
$this->assertTrue($response->headers->hasCacheControlDirective('public'));
639639
$this->assertFalse($response->headers->hasCacheControlDirective('private'));

Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function testRead()
8686
->method('findOne')
8787
->willReturnCallback(function ($criteria) use ($testTimeout) {
8888
$this->assertArrayHasKey($this->options['id_field'], $criteria);
89-
$this->assertEquals($criteria[$this->options['id_field']], 'foo');
89+
$this->assertEquals('foo', $criteria[$this->options['id_field']]);
9090

9191
$this->assertArrayHasKey($this->options['expiry_field'], $criteria);
9292
$this->assertArrayHasKey('$gte', $criteria[$this->options['expiry_field']]);

Tests/Session/Storage/PhpBridgeSessionStorageTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ public function testClear()
8383
$_SESSION['drak'] = 'loves symfony';
8484
$storage->getBag('attributes')->set('symfony', 'greatness');
8585
$key = $storage->getBag('attributes')->getStorageKey();
86-
$this->assertEquals($_SESSION[$key], ['symfony' => 'greatness']);
87-
$this->assertEquals($_SESSION['drak'], 'loves symfony');
86+
$this->assertEquals(['symfony' => 'greatness'], $_SESSION[$key]);
87+
$this->assertEquals('loves symfony', $_SESSION['drak']);
8888
$storage->clear();
89-
$this->assertEquals($_SESSION[$key], []);
90-
$this->assertEquals($_SESSION['drak'], 'loves symfony');
89+
$this->assertEquals([], $_SESSION[$key]);
90+
$this->assertEquals('loves symfony', $_SESSION['drak']);
9191
}
9292
}

0 commit comments

Comments
 (0)