public function testSetCacheControl() { $response = new THttpResponse(); $response->init(null); foreach (array('none', 'nocache', 'private', 'private_no_expire', 'public') as $cc) { $response->setCacheControl($cc); self::assertEquals($cc, $response->getCacheControl()); } try { $response->setCacheControl('invalid'); self::fail('Expected TInvalidDataValueException not thrown'); } catch (TInvalidDataValueException $e) { } }