public function testRequestApi() { $this->setExpectedException('Codeception\\Exception\\ModuleException'); $response = $this->module->_request('POST', '/form/try', ['user' => 'davert']); $data = data::get('form'); $this->assertEquals('davert', $data['user']); $this->assertInternalType('string', $response); $this->assertContains('Welcome to test app', $response); $this->module->click('Welcome to test app'); // page not loaded }