"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

CookieTest.php  (phplist-3.4.5.tgz):CookieTest.php  (phplist-3.4.6.tgz)
skipping to change at line 44 skipping to change at line 44
["\tMyName"], ["\tMyName"],
["\rMyName"], ["\rMyName"],
["\nMyName"], ["\nMyName"],
["\013MyName"], ["\013MyName"],
["\014MyName"], ["\014MyName"],
]; ];
} }
/** /**
* @dataProvider invalidNames * @dataProvider invalidNames
* @expectedException \InvalidArgumentException
*/ */
public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidC haracters($name) public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidC haracters($name)
{ {
$this->expectException('InvalidArgumentException');
new Cookie($name); new Cookie($name);
} }
/**
* @expectedException \InvalidArgumentException
*/
public function testInvalidExpiration() public function testInvalidExpiration()
{ {
$this->expectException('InvalidArgumentException');
new Cookie('MyCookie', 'foo', 'bar'); new Cookie('MyCookie', 'foo', 'bar');
} }
public function testNegativeExpirationIsNotPossible() public function testNegativeExpirationIsNotPossible()
{ {
$cookie = new Cookie('foo', 'bar', -100); $cookie = new Cookie('foo', 'bar', -100);
$this->assertSame(0, $cookie->getExpiresTime()); $this->assertSame(0, $cookie->getExpiresTime());
} }
skipping to change at line 124 skipping to change at line 122
$this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '-> getExpiresTime() returns the expire date'); $this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '-> getExpiresTime() returns the expire date');
} }
public function testGetExpiresTimeWithStringValue() public function testGetExpiresTimeWithStringValue()
{ {
$value = '+1 day'; $value = '+1 day';
$cookie = new Cookie('foo', 'bar', $value); $cookie = new Cookie('foo', 'bar', $value);
$expire = strtotime($value); $expire = strtotime($value);
$this->assertEquals($expire, $cookie->getExpiresTime(), '->getExpiresTim e() returns the expire date', 1); $this->assertEqualsWithDelta($expire, $cookie->getExpiresTime(), 1, '->g etExpiresTime() returns the expire date');
} }
public function testGetDomain() public function testGetDomain()
{ {
$cookie = new Cookie('foo', 'bar', 0, '/', '.myfoodomain.com'); $cookie = new Cookie('foo', 'bar', 0, '/', '.myfoodomain.com');
$this->assertEquals('.myfoodomain.com', $cookie->getDomain(), '->getDoma in() returns the domain name on which the cookie is valid'); $this->assertEquals('.myfoodomain.com', $cookie->getDomain(), '->getDoma in() returns the domain name on which the cookie is valid');
} }
public function testIsSecure() public function testIsSecure()
 End of changes. 5 change blocks. 
5 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)