Skip to content

[korowai/framework] Missing code coverage in traits used by test classes #11

@ptomulik

Description

@ptomulik
trait FooTestTrait
{
  public function test__foo() : void
  {
    $this->expectException(\Exception::class);
   throw  new \Exception('hello');
   // the closing brace is reported as uncovered
  }

  public function prov__bar() : array
  {
    return [
      [ 'a'], // this line is reported as uncovered
    ];
  }

  /**
   * @dataProvider prov__bar
   */
  public function test__bar(string $arg) : void
  {
    $this->assertSame('a', $arg);
  }
}

class FooTest
{
  use FooTestTrait;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions