mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-12 02:56:44 +00:00
d93a303371
* Fix Unintential Deprecated Calls in Tests - ENGINEERING 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 * Fix Deliberate Deprecated Tests Add annotations. * Run Unit Tests in Spreadsheet Context This turned up only one error, in IMSUB. The only group that still needs this is Statistical. Not sure if I will get to that quickly.
25 lines
1.1 KiB
PHP
25 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Engineering;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Engineering;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
// Sanity tests for functions which have been moved out of Engineering
|
|
// to their own classes. A deprecated version remains in Engineering;
|
|
// this class contains cursory tests to ensure that those work properly.
|
|
// If Scrutinizer fails the PR because of these deprecations, I will
|
|
// remove this class from the PR.
|
|
|
|
class MovedBitwiseTest extends TestCase
|
|
{
|
|
public function testMovedFunctions(): void
|
|
{
|
|
self::assertEquals(1, /** @scrutinizer ignore-deprecated */ Engineering::BITAND(1, 3));
|
|
self::assertEquals(3, /** @scrutinizer ignore-deprecated */ Engineering::BITOR(1, 3));
|
|
self::assertEquals(2, /** @scrutinizer ignore-deprecated */ Engineering::BITXOR(1, 3));
|
|
self::assertEquals(32, /** @scrutinizer ignore-deprecated */ Engineering::BITLSHIFT(8, 2));
|
|
self::assertEquals(2, /** @scrutinizer ignore-deprecated */ Engineering::BITRSHIFT(8, 2));
|
|
}
|
|
}
|