mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-359: Specified, but empty CLI Options --option= causes Notice undefined offset: 0 [Test case for CliController included] #446
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 21, 2010).
Originally assigned to: @jwage on GitHub.
Jira issue originally created by user naderman:
Specified, but empty CLI Options --option= cause a Notice (undefined offset: 0)
This problem also exists in trunk.
What I ran:
Expected output:
Actual output:
I decided to write a patch and a test case for the issue but it turns out there aren't any tests for CliController, so I added some. You can find the result attached. Not sure if you can still call this "unit" test but it looks to me like the best you can currently do and should work quite well.
I also came across another problem in CliController where it incorrectly refers to AbstractPrinter, rather than Printers\AbstractPrinter which is now included in the patch for the original bug.
I'm not sure what your guideline on @author tags is, I added them to the test case and the TaskMock class now, but feel free to remove them if you like. Some of Doctrine's files seem to have them and some not.
@doctrinebot commented on GitHub (Feb 21, 2010):
@doctrinebot commented on GitHub (Mar 18, 2010):
Comment created by @jwage:
Thanks for the bug report and awesome patch/test case!
@doctrinebot commented on GitHub (Mar 18, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 2 attachments from Jira into https://gist.github.com/27196a8ad68d10e999a5