@@ -116,6 +116,8 @@ public function testSeeLink()
116116 $ this ->module ->amOnPage ('/external_url ' );
117117 $ this ->module ->seeLink ('Next ' );
118118 $ this ->module ->seeLink ('Next ' , 'http://codeception.com/ ' );
119+ // Without TLD and trailing slash
120+ $ this ->module ->dontSeeLink ('Next ' , 'http://codeception ' );
119121 }
120122
121123 public function testDontSeeLink ()
@@ -145,6 +147,16 @@ public function testSeeLinkFailsIfHrefDoesNotMatch()
145147 $ this ->module ->seeLink ('Next ' , '/fsdfsdf/ ' );
146148 }
147149
150+ public function testSeeLinkFailsIfHrefDoesNotMatchExactly ()
151+ {
152+ $ this ->setExpectedException (
153+ 'PHPUnit\Framework\AssertionFailedError ' ,
154+ "No links containing text 'Next' and URL 'http://codeception' were found in page /external_url "
155+ );
156+ $ this ->module ->amOnPage ('/external_url ' );
157+ $ this ->module ->seeLink ('Next ' , 'http://codeception ' );
158+ }
159+
148160 public function testDontSeeLinkFailsIfTextMatches ()
149161 {
150162 $ this ->setExpectedException (
@@ -169,6 +181,7 @@ public function testSeeLinkMatchesRelativeLink()
169181 {
170182 $ this ->module ->amOnPage ('/info ' );
171183 $ this ->module ->seeLink ('Sign in! ' , '/login ' );
184+ $ this ->module ->dontSeeLink ('Sign in! ' , '/log ' );
172185 }
173186
174187 public function testDontSeeLinkMatchesRelativeLink ()
0 commit comments