'Laravel / codeception problem with tests annotations [PHPUnit\Framework\Warning] "@covers \TestController::__construct" is invalid

I have problem with @covers annotation in tests (annotations like: @doesNotPerformAssertions works fine).

enter image description here

codeception.sh do nothing special... mostly just put test in sandbox.

PHP:

php -v
PHP 8.1.4 (cli) (built: Apr  4 2022 13:30:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
    with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans

Framework: Laravel Framework 9.8.1

Here is the dummy test source:

namespace Tests\Unit\Http\Controllers;
 
use App\Http\Controllers\TestController; 
use Codeception\Test\Unit;

class TestController_Test extends Unit {

     private static $O;

     public function _before()
     {
         self::$O = new TestController();
     }
 
     /**
     * @covers \TestController::__construct
     */
     public function testIndex()
     {
         // Dummy...
         $this->assertNotEmpty(self::$O->index());
     }
}

I have no idea why @coves not works for me at all. Any help would be appreciated. Is there anyone who had similar problem?

I edited typo. So, @covers not work in my tests. :(



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source