Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Hotfix/zend test with console route#4010

Closed
blanchonvincent wants to merge 3 commits into
zendframework:masterfrom
blanchonvincent:hotfix/zend-test-with-console-route
Closed

Hotfix/zend test with console route#4010
blanchonvincent wants to merge 3 commits into
zendframework:masterfrom
blanchonvincent:hotfix/zend-test-with-console-route

Conversation

@blanchonvincent
Copy link
Copy Markdown
Contributor

Fix split on space to retrieve argument console. I used array and temporary string to fix, but i am sure a regex can be better.

@blanchonvincent
Copy link
Copy Markdown
Contributor Author

I will test with regex, it's will be more clean.

@farnoux
Copy link
Copy Markdown

farnoux commented Mar 12, 2013

FYI I worked on this last night and came up with the following code (using a regex):

if ($this->useConsoleRequest) {
        preg_match_all('/(--\S+[= ]"\S*\s*\S*")|(--\S+=\S+|--\S+\s\S+|\S+)/', $url, $matches);
        $params = str_replace(array(' "', '"'), array('=', ''), $matches[0]);
        $request->params()->exchangeArray($params);
        return $this;
}

@blanchonvincent
Copy link
Copy Markdown
Contributor Author

I change the PR with the regex and add test case.

@farnoux Thank you for your help !

@farnoux
Copy link
Copy Markdown

farnoux commented Mar 12, 2013

My pleasure! Glad it helped :)

@ghost ghost assigned weierophinney Mar 12, 2013
weierophinney added a commit that referenced this pull request Mar 12, 2013
…onsole-route

Hotfix/zend test with console route
weierophinney added a commit that referenced this pull request Mar 12, 2013
- trailing whitespace
weierophinney added a commit that referenced this pull request Mar 12, 2013
curious-eyes pushed a commit to curious-eyes/zf2 that referenced this pull request Mar 18, 2013
- trailing whitespace
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
…ent/hotfix/zend-test-with-console-route

Hotfix/zend test with console route
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants