Skip to content

Commit 44f5147

Browse files
Merge branch '3.4' into 4.4
* 3.4: [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) [SCA] Minor fixes on tests
2 parents 768f66a + b11fb1a commit 44f5147

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
@@ -617,20 +617,20 @@ public function testSetCache()
617617

618618
$options = ['etag' => '"whatever"'];
619619
$response->setCache($options);
620-
$this->assertEquals($response->getEtag(), '"whatever"');
620+
$this->assertEquals('"whatever"', $response->getEtag());
621621

622622
$now = $this->createDateTimeNow();
623623
$options = ['last_modified' => $now];
624624
$response->setCache($options);
625-
$this->assertEquals($response->getLastModified()->getTimestamp(), $now->getTimestamp());
625+
$this->assertEquals($now->getTimestamp(), $response->getLastModified()->getTimestamp());
626626

627627
$options = ['max_age' => 100];
628628
$response->setCache($options);
629-
$this->assertEquals($response->getMaxAge(), 100);
629+
$this->assertEquals(100, $response->getMaxAge());
630630

631631
$options = ['s_maxage' => 200];
632632
$response->setCache($options);
633-
$this->assertEquals($response->getMaxAge(), 200);
633+
$this->assertEquals(200, $response->getMaxAge());
634634

635635
$this->assertTrue($response->headers->hasCacheControlDirective('public'));
636636
$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)