mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-20 15:16:36 +00:00
Make Tests non-Static
This commit is contained in:
@@ -37,10 +37,7 @@ class Hyperlink
|
||||
return ExcelError::REF();
|
||||
}
|
||||
|
||||
if (is_object($displayName)) {
|
||||
$displayName = $linkURL;
|
||||
}
|
||||
$displayName = StringHelper::convertToString($displayName);
|
||||
$displayName = StringHelper::convertToString($displayName, false);
|
||||
if (trim($displayName) === '') {
|
||||
$displayName = $linkURL;
|
||||
}
|
||||
|
||||
@@ -321,10 +321,7 @@ class Html extends BaseReader
|
||||
}
|
||||
|
||||
//catching the Exception and ignoring the invalid data types
|
||||
$hyperlink = null;
|
||||
if ($sheet->hyperlinkExists($column . $row)) {
|
||||
$hyperlink = $sheet->getHyperlink($column . $row);
|
||||
}
|
||||
$hyperlink = $sheet->hyperlinkExists($column . $row) ? $sheet->getHyperlink($column . $row) : null;
|
||||
|
||||
try {
|
||||
$sheet->setCellValueExplicit($column . $row, $cellContent, $attributeArray['data-type']);
|
||||
|
||||
@@ -10,7 +10,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
class Hyperlink2Test extends TestCase
|
||||
{
|
||||
public static function testTwoLiterals(): void
|
||||
public function testTwoLiterals(): void
|
||||
{
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
@@ -35,7 +35,7 @@ class Hyperlink2Test extends TestCase
|
||||
$spreadsheet->disconnectWorksheets();
|
||||
}
|
||||
|
||||
public static function testCellAndLiteral(): void
|
||||
public function testCellAndLiteral(): void
|
||||
{
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
@@ -60,7 +60,7 @@ class Hyperlink2Test extends TestCase
|
||||
$spreadsheet->disconnectWorksheets();
|
||||
}
|
||||
|
||||
public static function testLiteralAndCell(): void
|
||||
public function testLiteralAndCell(): void
|
||||
{
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
@@ -110,7 +110,7 @@ class Hyperlink2Test extends TestCase
|
||||
$spreadsheet->disconnectWorksheets();
|
||||
}
|
||||
|
||||
public static function testResetOnSet(): void
|
||||
public function testResetOnSet(): void
|
||||
{
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
@@ -132,7 +132,7 @@ class Hyperlink2Test extends TestCase
|
||||
self::assertSame('', $hyperlink->getTooltip());
|
||||
}
|
||||
|
||||
public static function testResetOnSetExplicit(): void
|
||||
public function testResetOnSetExplicit(): void
|
||||
{
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
|
||||
Reference in New Issue
Block a user