diff options
Diffstat (limited to 'plugins/Insights/tests/Unit/InsightReportTest.php')
-rw-r--r-- | plugins/Insights/tests/Unit/InsightReportTest.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Insights/tests/Unit/InsightReportTest.php b/plugins/Insights/tests/Unit/InsightReportTest.php index 34518321ba..98b54a100a 100644 --- a/plugins/Insights/tests/Unit/InsightReportTest.php +++ b/plugins/Insights/tests/Unit/InsightReportTest.php @@ -55,7 +55,7 @@ class InsightReportTest extends \PHPUnit\Framework\TestCase */ // TODO use data providers - public function setUp() + public function setUp(): void { $this->currentTable = new DataTable(); $this->currentTable->addRowsFromArray(array( @@ -110,12 +110,11 @@ class InsightReportTest extends \PHPUnit\Framework\TestCase ); } - /** - * @expectedException \Exception - * @expectedExceptionMessage Unsupported orderBy - */ public function test_generateInsight_Order_ShouldThrowException_IfInvalid() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Unsupported orderBy'); + $this->generateInsight(2, 2, 2, 17, -17, 'InvalidOrDeRbY'); } @@ -270,7 +269,7 @@ class InsightReportTest extends \PHPUnit\Framework\TestCase 'minDisappearedPercent' => 8, ); - $this->assertInternalType('array', $metadata['report']); + self::assertIsArray($metadata['report']); $this->assertEquals('TestReport', $metadata['report']['name']); unset($metadata['report']); unset($metadata['totals']); |