From dfcab0c13f1a53d4bdaf1656ba29495ef94a1f26 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Wed, 6 Dec 2017 07:46:31 -0200 Subject: [PATCH] Use assertInstanceOf (#286) --- tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php | 4 ++-- tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php | 2 +- tests/PhpSpreadsheetTests/Chart/LayoutTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php b/tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php index 74f403d1..11d8c00c 100644 --- a/tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php +++ b/tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php @@ -24,7 +24,7 @@ class HyperlinkTest extends TestCase $testInstance = new Hyperlink($initialUrlValue); $result = $testInstance->setUrl($newUrlValue); - self::assertTrue($result instanceof Hyperlink); + self::assertInstanceOf(Hyperlink::class, $result); $result = $testInstance->getUrl(); self::assertEquals($newUrlValue, $result); @@ -47,7 +47,7 @@ class HyperlinkTest extends TestCase $testInstance = new Hyperlink(null, $initialTooltipValue); $result = $testInstance->setTooltip($newTooltipValue); - self::assertTrue($result instanceof Hyperlink); + self::assertInstanceOf(Hyperlink::class, $result); $result = $testInstance->getTooltip(); self::assertEquals($newTooltipValue, $result); diff --git a/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php b/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php index 47c018ad..2231bc26 100644 --- a/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php +++ b/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php @@ -19,7 +19,7 @@ class DataSeriesValuesTest extends TestCase foreach ($dataTypeValues as $dataTypeValue) { $result = $testInstance->setDataType($dataTypeValue); - self::assertTrue($result instanceof DataSeriesValues); + self::assertInstanceOf(DataSeriesValues::class, $result); } } diff --git a/tests/PhpSpreadsheetTests/Chart/LayoutTest.php b/tests/PhpSpreadsheetTests/Chart/LayoutTest.php index 05166e8e..9ae80460 100644 --- a/tests/PhpSpreadsheetTests/Chart/LayoutTest.php +++ b/tests/PhpSpreadsheetTests/Chart/LayoutTest.php @@ -14,7 +14,7 @@ class LayoutTest extends TestCase $testInstance = new Layout(); $result = $testInstance->setLayoutTarget($LayoutTargetValue); - self::assertTrue($result instanceof Layout); + self::assertInstanceOf(Layout::class, $result); } public function testGetLayoutTarget()