Skip to content

Commit

Permalink
Add tests for domains with leading period
Browse files Browse the repository at this point in the history
This is part of the compatibility with older clients/servers as
specified in the RFC.
  • Loading branch information
rmccue committed May 17, 2014
1 parent ac0ce86 commit f44da21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public function domainMatchProvider() {
array('example.com', 'www.example.com', false, true),
array('example.com', 'example.net', false, false),

// Leading period
array('.example.com', 'example.com', true, true),
array('.example.com', 'www.example.com', false, true),
array('.example.com', 'example.net', false, false),

// Prefix, but not subdomain
array('example.com', 'notexample.com', false, false),
array('example.com', 'notexample.net', false, false),
Expand Down

0 comments on commit f44da21

Please sign in to comment.