This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245175 - [InvalidArgumentException] Command "Calculator" is not defined with PHPUNIT.
Summary: [InvalidArgumentException] Command "Calculator" is not defined with PHPUNIT.
Status: RESOLVED DUPLICATE of bug 245179
Alias: None
Product: php
Classification: Unclassified
Component: PHPUnit (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-21 16:25 UTC by virofla
Modified: 2014-07-07 05:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Same problem (196.82 KB, image/jpeg)
2014-07-05 16:22 UTC, coderdj412
Details

Note You need to log in before you can comment on or make changes to this bug.
Description virofla 2014-06-21 16:25:17 UTC
Hello, I installed it on my version of netbeans and phpunit phpunit 8 by composer-skeleton.
Then I created a sample class called teasing calculator.php 

//example
<?php

class Calculator
{
    /**
     * @assert (0, 0) == 0
     * @assert (0, 1) == 1
     * @assert (1, 0) == 1
     * @assert (1, 1) == 2
     * @assert (1, 2) == 4
     */
    public function add($a, $b)
    {
        return $a + $b;
    }
}
?>
 
and when I click with the right mouse button and click on "Tools -> Create Test" console gives me this and I do not generate the test:

"C:\wamp\www\annunci\vendor\bin\phpunit-skelgen.bat" "--test" "--" "Calculator" "C:\wamp\www\annunci\app\models\Calculator.php" "CalculatorTest" "C:\wamp\www\annunci\test\app\models\CalculatorTest.php"
phpunit-skelgen 2.0.1 by Sebastian Bergmann.
                                     
  [InvalidArgumentException]            
  Command "Calculator" is not defined.  

Done.

How can I fix? 
thanks
Comment 1 Tomas Mysik 2014-06-23 04:53:24 UTC
Which version of Skeleton Generator do you have? Simply reopen this issue, thanks.
Comment 2 coderdj412 2014-07-05 16:22:31 UTC
Created attachment 147901 [details]
Same problem
Comment 3 coderdj412 2014-07-05 16:23:47 UTC
I am having the same problem and I am using NB 7.4 w/ PHPUnit-Skelgen 2.01
Comment 4 Tomas Mysik 2014-07-07 05:11:25 UTC
(In reply to coderdj412 from comment #3)
> PHPUnit-Skelgen 2.01

You need to use a dev version of NetBeans which supports Skeleton Generator 2.x.

Thanks.

*** This bug has been marked as a duplicate of bug 245179 ***