File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed
Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,17 @@ public function testRfcExample()
145145
146146 public function testExactMatchesBeatPartial ()
147147 {
148- $ this ->assertTrue (self ::getRobotsTxt ('match ' )->isAllowed ('Googlebot-News ' , '/ ' ));
149- $ this ->assertTrue (self ::getRobotsTxt ('match ' )->isDisallowed ('Googlebot ' , '/ ' ));
148+ $ this ->assertTrue (self ::getRobotsTxt ('precedence ' )->isAllowed ('Googlebot-News ' , '/news ' ));
149+ $ this ->assertTrue (self ::getRobotsTxt ('precedence ' )->isDisallowed ('Googlebot ' , '/news ' ));
150+ }
151+
152+ public function testGooglePrecedenceSpec ()
153+ {
154+ $ g = self ::getRobotsTxt ('precedence ' );
155+ $ this ->assertTrue ($ g ->isAllowed ('Googlebot-News ' , '/news ' ));
156+ $ this ->assertTrue ($ g ->isAllowed ('Googlebot ' , '/bot ' ));
157+
158+ $ this ->assertTrue ($ g ->isAllowed ('Googlebot-Images ' , '/bot ' ));
159+ $ this ->assertTrue ($ g ->isDisallowed ('Googlebot-Images ' , '/news ' ));
150160 }
151161}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ user-agent: googlebot-news
2+ Disallow: /
3+ Allow: /news
4+
5+ user-agent: *
6+ Disallow: /
7+
8+ user-agent: googlebot
9+ Disallow: /
10+ Allow: /bot
You can’t perform that action at this time.
0 commit comments