Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alecrabbit committed Apr 26, 2019
1 parent f0cca7c commit 2f6f033
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Unit/ReportableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ public function check(): void
$this->assertStringContainsString(ExtendsReportableReport::REPORT_HAS_BEEN_BUILT, (string)$report);
}

/** @test */
public function reportAlreadyInitialized(): void
{
$obj = new class extends ExtendsReportable {
public function __construct()
{
$this->report = new ExtendsReportableReport();
}

};
$report = $obj->report();
$this->assertInstanceOf(ExtendsReportableReport::class, $report);
$this->assertStringContainsString(ExtendsReportableReport::REPORT_HAS_BEEN_BUILT, (string)$report);
}

protected function setUp(): void
{
$this->obj = new ExtendsReportable();
Expand Down

0 comments on commit 2f6f033

Please sign in to comment.