Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/MovedBitwiseTest.php
T
Adrien Crivelli 2a0a53cd6a Drop all Scrutinizer annotations
Because they tend to clutter our code a lot and unfortunately, there are
lots of false positives. Instead, it would probably be better to deal
with false positives out of band, via the Scrutinizer web UI.
2023-09-21 11:14:47 +08:00

27 lines
913 B
PHP

<?php
declare(strict_types=1);
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, Engineering::BITAND(1, 3));
self::assertEquals(3, Engineering::BITOR(1, 3));
self::assertEquals(2, Engineering::BITXOR(1, 3));
self::assertEquals(32, Engineering::BITLSHIFT(8, 2));
self::assertEquals(2, Engineering::BITRSHIFT(8, 2));
}
}