File tree Expand file tree Collapse file tree
tests/unit/Codeception/Module Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,32 @@ public function testArrayOfZeroesInJsonResponse()
182182 ]);
183183 }
184184
185+ /**
186+ * @Issue https://github.com/Codeception/Codeception/issues/1650
187+ */
188+ public function testDoubleGet () {
189+ $ cest1 = Stub::makeEmpty ('\Codeception\TestCase\Cest ' );
190+ $ cest2 = Stub::makeEmpty ('\Codeception\TestCase\Cest ' );
191+
192+ $ this ->module ->sendGET ('/rest/user/ ' );
193+ $ this ->module ->seeResponseIsJson ();
194+ $ this ->module ->seeResponseContains ('davert ' );
195+ $ this ->module ->seeResponseContainsJson (array ('name ' => 'davert ' ));
196+ $ this ->module ->seeResponseCodeIs (200 );
197+ $ this ->module ->dontSeeResponseCodeIs (404 );
198+ $ this ->phpBrowser ->_after ($ cest1 );
199+ $ this ->module ->_after ($ cest1 );
200+ $ this ->module ->_before ($ cest2 );
201+ $ this ->phpBrowser ->_before ($ cest2 );
202+ $ this ->module ->sendGET ('/rest/user/ ' );
203+ $ this ->module ->seeResponseIsJson ();
204+ $ this ->module ->seeResponseContains ('davert ' );
205+ $ this ->module ->seeResponseContainsJson (array ('name ' => 'davert ' ));
206+ $ this ->module ->seeResponseCodeIs (200 );
207+ $ this ->module ->dontSeeResponseCodeIs (404 );
208+
209+ }
210+
185211 protected function shouldFail ()
186212 {
187213 $ this ->setExpectedException ('PHPUnit_Framework_AssertionFailedError ' );
You can’t perform that action at this time.
0 commit comments