Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
NetBeans PHPUnit测试生成忽略@assert注释_Netbeans_Phpunit - Fatal编程技术网

NetBeans PHPUnit测试生成忽略@assert注释

NetBeans PHPUnit测试生成忽略@assert注释,netbeans,phpunit,Netbeans,Phpunit,我有一个抽象类,其中的源代码如下所示: /* * @assert (0) == NULL */ public static function factory($num) { if ($num==0) return NULL; //do some other stuff } 如果我删除先前生成的测试文件并使用“Create PHPUnit tests”,它将创建一个新的单元测试文件,该文件似乎根本没有考虑断言: /** * @covers {classNa

我有一个抽象类,其中的源代码如下所示:

/*
 * @assert (0) == NULL
 */
public static function factory($num) {
    if ($num==0)
        return NULL;

    //do some other stuff
}
如果我删除先前生成的测试文件并使用“Create PHPUnit tests”,它将创建一个新的单元测试文件,该文件似乎根本没有考虑断言:

/**
 * @covers {className}::{origMethodName}
 * @todo Implement testFactory().
 */
public function testFactory() {
    // Remove the following lines when you implement this test.
    $this->markTestIncomplete(
            'This test has not been implemented yet.'
    );
}
我一定是在做傻事,但我想不出是什么。在生成的@covers注释中未能展开类名和方法名可能是一个线索吗


我正在使用PHP5.3.6和PHPUnit 3.6.2在Mac上运行NetBeans 7.0.1。

所有注释必须出现在DocBlock注释中,以
/**
开头,而不是
/*
。你少了一个星号

/**
 * @assert (0) == NULL
 */
public static function factory($num) {