Skip to content

Commit b11fb1a

Browse files
committed
[SCA] Minor fixes on tests
1 parent 3f65b22 commit b11fb1a

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

593593
$options = ['etag' => '"whatever"'];
594594
$response->setCache($options);
595-
$this->assertEquals($response->getEtag(), '"whatever"');
595+
$this->assertEquals('"whatever"', $response->getEtag());
596596

597597
$now = $this->createDateTimeNow();
598598
$options = ['last_modified' => $now];
599599
$response->setCache($options);
600-
$this->assertEquals($response->getLastModified()->getTimestamp(), $now->getTimestamp());
600+
$this->assertEquals($now->getTimestamp(), $response->getLastModified()->getTimestamp());
601601

602602
$options = ['max_age' => 100];
603603
$response->setCache($options);
604-
$this->assertEquals($response->getMaxAge(), 100);
604+
$this->assertEquals(100, $response->getMaxAge());
605605

606606
$options = ['s_maxage' => 200];
607607
$response->setCache($options);
608-
$this->assertEquals($response->getMaxAge(), 200);
608+
$this->assertEquals(200, $response->getMaxAge());
609609

610610
$this->assertTrue($response->headers->hasCacheControlDirective('public'));
611611
$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
@@ -102,7 +102,7 @@ public function testRead()
102102
->method('findOne')
103103
->willReturnCallback(function ($criteria) use ($testTimeout) {
104104
$this->assertArrayHasKey($this->options['id_field'], $criteria);
105-
$this->assertEquals($criteria[$this->options['id_field']], 'foo');
105+
$this->assertEquals('foo', $criteria[$this->options['id_field']]);
106106

107107
$this->assertArrayHasKey($this->options['expiry_field'], $criteria);
108108
$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
@@ -87,10 +87,10 @@ public function testClear()
8787
$_SESSION['drak'] = 'loves symfony';
8888
$storage->getBag('attributes')->set('symfony', 'greatness');
8989
$key = $storage->getBag('attributes')->getStorageKey();
90-
$this->assertEquals($_SESSION[$key], ['symfony' => 'greatness']);
91-
$this->assertEquals($_SESSION['drak'], 'loves symfony');
90+
$this->assertEquals(['symfony' => 'greatness'], $_SESSION[$key]);
91+
$this->assertEquals('loves symfony', $_SESSION['drak']);
9292
$storage->clear();
93-
$this->assertEquals($_SESSION[$key], []);
94-
$this->assertEquals($_SESSION['drak'], 'loves symfony');
93+
$this->assertEquals([], $_SESSION[$key]);
94+
$this->assertEquals('loves symfony', $_SESSION['drak']);
9595
}
9696
}

0 commit comments

Comments
 (0)