Ticket #862 (closed defect: fixed)

Opened 11 months ago

Last modified 6 months ago

Command line switches without parameter don't work

Reported by: jorrit Owned by: mapi
Priority: major Milestone:
Component: phpUnderControl Version: phpUnderControl 0.4.7
Keywords: Cc:
PHP Version: 5.2.9

Description

I tried to set the --without-php-documentor setting, but it complained that it needed a value. This is because the function that registers the argument registers the $args parameter of $def->addOption() as 'false', whereas ConsoleInput checks it for being strictly null.

Attachments

phpuc-862.patch Download (1.0 KB) - added by jorrit 11 months ago.
patch against svn trunk

Change History

Changed 11 months ago by jorrit

patch against svn trunk

Changed 6 months ago by proofek

  • status changed from new to assigned

Fixed as part of  ticket-862 branch.

addOption() when it doesn't require argument shouldn't pass that as false but null (which is the default).

Unit test updated as well (2 custom asserts added - assertPhpucTaskOnTheList and assertPhpucTaskNotOnTheList).

phpunit --testdox Tasks/TasksAllTests.php 
PHPUnit 3.4.8 by Sebastian Bergmann.

phpucCheckoutTask
 [x] Subversion checkout
 [ ] Cvs checkout
 [x] Git checkout

phpucCodeBrowserTask
 [x] Execute with absolute source directory
 [x] Execute with relative source directory
 [x] Execute with log directory copy target
 [x] Execute with artifacts directory copy target
 [x] Code browser task is ignored

phpucCreateFileTask
 [x] Create files

phpucCruiseControlTask
 [x] Validate with invalid c c install dir fail
 [x] Validate with in valid directory structure fail
 [x] Validate with valid directory structure
 [x] Execute with valid directory structure

phpucGraphTask
 [x] Install graph example without artifacts directory
 [x] Install graph example with artifacts directory
 [x] Graph task is ignored

phpucMergePhpunitTask
 [x] Input option is mandatory fail
 [x] Input option requires value fail
 [x] Output option is mandatory fail
 [x] Output option requires value fail
 [x] Build option requires value fail
 [x] Input option with invalid log file fail
 [x] Input and builds option number must match fail
 [x] Create output directory fail
 [x] Merge log files from different directories without custom build ids
 [x] Merge log files from different directories with build ids
 [x] Merge log files from different directories with build ids and one missing file fail
 [x] Merge log files with missing log file creates file throw runtime exception
 [x] Merge log files from single directory without custom build ids
 [x] Merge log files from single directory with custom build ids

phpucModifyFileTask
 [x] Validate
 [x] Validate with not existing file fail
 [x] Execute
 [x] Execute with customized java server page

phpucPhpCodeSnifferTask
 [x] Code sniffer version validate
 [x] Code sniffer version validate with invalid version
 [x] Code sniffer execute build file modifications
 [x] Php code sniffer task is ignored

phpucPHPUnitTask
 [x] P h p unit version validate
 [x] P h p unit execute build file modifications
 [x] P h p unit execute config file without artifacts directory
 [x] P h p unit execute config file with artifacts directory
 [x] Validate find p h p unit executable fail
 [x] Validate find p h p unit executable in path
 [x] P h p unit task is ignored

phpucPhpDocumentorTask
 [x] P h p documentor execute config file without artifacts directory
 [x] P h p documentor execute config file with artifacts directory
 [x] Php documentor task is ignored

phpucProjectCleanTask
 [x] Execute project clean task with number of builds
 [x] Execute project clean task with keep days

phpucProjectDeleteTask
 [x] Validate project delete task
 [x] Validate project delete task with invalid project fail
 [x] Validate project delete task without config xml fail
 [x] Validate project delete without project configuration fail
 [x] Execute delete project config changes and project directories

phpucProjectTask
 [x] Validate project task no error
 [x] Validate project task without c c projects dir fail
 [x] Validate project task with existing project directory fail
 [x] Execute project task no error
 [x] Get ant dir returns ant location
 [x] Get ant dir returns external ant home
 [x] Execute project task without ant directory fail

Changed 6 months ago by mapi

  • status changed from assigned to closed
  • resolution set to fixed

Fixed, due to proofek's  branch on github.

Note: See TracTickets for help on using tickets.