New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide binary response data in debug #1884 #3985

Merged
merged 2 commits into from Feb 3, 2017

Conversation

Projects
None yet
3 participants
@spikyjt
Contributor

spikyjt commented Feb 2, 2017

@DavertMik

Looks good. One comment from me

Show outdated Hide outdated src/Codeception/Module/REST.php
@@ -498,7 +498,13 @@ protected function execute($method, $url, $parameters = [], $files = [])
$this->debugSection("Request", "$method $url " . $requestData);
$this->response = (string)$this->connectionModule->_request($method, $url, [], $files, [], $parameters);
}
$this->debugSection("Response", $this->response);
$response = $this->response;

This comment has been minimized.

@DavertMik

DavertMik Feb 3, 2017

Member

could you name as printedResponse so it would be obvious that this is can't be used as real response

@DavertMik

DavertMik Feb 3, 2017

Member

could you name as printedResponse so it would be obvious that this is can't be used as real response

This comment has been minimized.

@spikyjt

spikyjt Feb 3, 2017

Contributor

Yeah that makes sense.

I'll also rework it to move the formatting out to a couple of methods, so that the code is not repeated.

@spikyjt

spikyjt Feb 3, 2017

Contributor

Yeah that makes sense.

I'll also rework it to move the formatting out to a couple of methods, so that the code is not repeated.

/**
* Check if data has non-printable bytes and it is not a valid unicode string
*

This comment has been minimized.

@Nitpick-CI

Nitpick-CI Feb 3, 2017

Whitespace found at end of line

@Nitpick-CI

Nitpick-CI Feb 3, 2017

Whitespace found at end of line

/**
* Format a binary string for debug printing
*

This comment has been minimized.

@Nitpick-CI

Nitpick-CI Feb 3, 2017

Whitespace found at end of line

@Nitpick-CI

Nitpick-CI Feb 3, 2017

Whitespace found at end of line

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Feb 3, 2017

Member

Awesome, thank you!

Member

DavertMik commented Feb 3, 2017

Awesome, thank you!

@DavertMik DavertMik merged commit 5f4c326 into Codeception:2.2 Feb 3, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
wercker/build Wercker pipeline passed
Details

@spikyjt spikyjt deleted the spikyjt:spikyjt-1884 branch Feb 3, 2017

chris1312 added a commit to chris1312/Codeception that referenced this pull request Jun 16, 2017

hide binary response data in debug #1884 (#3985)
* hide binary response data in debug #1884

* rework binary formatting for DRY, variable rename #1884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment