assertEquals('max-age=10', (string)$cacheControl); } /** * @test */ public function testCacheControlWithoutSeconds() { $cacheControl = new CacheControl(CacheControl::PRIVATE); $this->assertEquals('private', (string)$cacheControl); } /** * @test */ public function testCacheControlWithInvalidSeconds() { $this->expectException(\InvalidArgumentException::class); new CacheControl(CacheControl::MAX_AGE, -1); } /** * @test */ public function testCacheControlWithInvalidMode() { $this->expectException(\InvalidArgumentException::class); new CacheControl(-1); } }