Updated getopt dependency to the latest version#23
Conversation
… was breaking on 3.2.2 but passing on 3.0 Change-Id: I8aca692518b75b6bbec20337cf738a3a0db2a50f
| { | ||
| $this->expectOutputRegex('/Usage/'); | ||
| $_SERVER['argv'] = [null, '--customerId', '--campaignId', 11111]; | ||
| $_SERVER['argv'] = [null, '--campaignId', 11111, '--customerId']; |
There was a problem hiding this comment.
This shouldn't be changed.
The test is aimed to test the case when customerId (which is required) is specified, but no value is given.
There was a problem hiding this comment.
You're right, but getopt changed its behavior between versions and now interprets '--campaignId' as the value for '--customerId', so to test the case when customerId is specified but no value is given this is correct.
Do you think we should add a specific test for the case when an example is invoked with something like --customerId --campaignId 111111 or should we just leave it as it is, having examples fail with request_error: Invalid customer ID '--campaignId'?
There was a problem hiding this comment.
Thanks for confirming. Then, this already LGTM.
This also fixes a test that fails with getopt v3.2.2 but passes with v3.0.