Skip to content

Commit 4153f4d

Browse files
committed
Reproduced issue Codeception#2075
Conflicts: tests/unit/Codeception/Module/PhpBrowserRestTest.php
1 parent 5cea1cd commit 4153f4d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

tests/unit/Codeception/Module/PhpBrowserRestTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff 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');

0 commit comments

Comments
 (0)