PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/XorTest.php

32 lines
747 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Calculation\Logical;
use PHPUnit\Framework\TestCase;
class XorTest extends TestCase
{
protected function setUp(): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
/**
* @dataProvider providerXOR
*
* @param mixed $expectedResult
*/
public function testXOR($expectedResult, ...$args)
{
$result = Logical::logicalXor(...$args);
$this->assertEquals($expectedResult, $result);
}
public function providerXOR()
{
return require 'tests/data/Calculation/Logical/XOR.php';
}
}