vscode-phpunit
vscode-phpunit copied to clipboard
Code Lens no longer present following test containing HEREDOC code
If you write a test containing HEREDOC code, PHPUnit Test Explorer stops displaying Code Lens controls on every test following this one.
Reproduce with:
<?php
use PHPUnit\Framework\TestCase;
class DebugTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
}
protected function tearDown(): void
{
parent::tearDown();
}
public function __construct()
{
parent::__construct();
}
public function testBefore()
{
$this->markTestSkipped();
}
public function testParseMinimalVEventObject(): void
{
$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD;
$this->$this->markTestIncomplete('Got a HEREDOC here');
}
public function testDontSeeCodeLens(): void
{
$this->markTestSkipped();
}
public function testCodeLensMissingHereToo(): void
{
$this->markTestSkipped();
}
}
See attached screenshot for the result (formatted tightly so you can see the whole screen)
.
These 'HEREDOC' test run just fine using phpunit from the terminal command line.