mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-22 16:19:19 +00:00
704a7b9fd1
* Fix Unintential Deprecated Calls in Tests - LOOKUPREF I think it's best to install these before PR #3166. There are no changes to source code, only to test members which continue to inadvertently use calls to deprecated functions. * Fix deprecation DocBlocks Deprecated->deprecated, adjust see and comments * One Intentional Deprecation Annotate it.
30 lines
1.4 KiB
PHP
30 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
|
use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* Sanity tests for functions which have been moved out of LookupRef
|
|
* to their own classes. A deprecated version remains in LookupRef;
|
|
* this class contains cursory tests to ensure that those work properly.
|
|
* Only 6 of the 15 functions are covered below at the moment.
|
|
*
|
|
* @covers \PhpOffice\PhpSpreadsheet\Calculation\LookupRef
|
|
*/
|
|
class MovedFunctionsTest extends TestCase
|
|
{
|
|
public function testMovedFunctions(): void
|
|
{
|
|
self::assertSame(3, /** @scrutinizer ignore-deprecated */ LookupRef::COLUMN('C5'));
|
|
self::assertSame(ExcelError::REF(), /** @scrutinizer ignore-deprecated */ LookupRef::FORMULATEXT('A1'));
|
|
self::assertSame(ExcelError::REF(), /** @scrutinizer ignore-deprecated */ LookupRef::HYPERLINK('https://phpspreadsheet.readthedocs.io/en/latest/', 'Read the Docs'));
|
|
self::assertSame('#VALUE!', /** @scrutinizer ignore-deprecated */ LookupRef::OFFSET(null));
|
|
self::assertSame(5, /** @scrutinizer ignore-deprecated */ LookupRef::ROW('C5'));
|
|
self::assertSame([[1, 2], [3, 4]], /** @scrutinizer ignore-deprecated */ LookupRef::TRANSPOSE([[1, 3], [2, 4]]));
|
|
}
|
|
}
|