mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-22 16:19:19 +00:00
ec4098c8fd
While we might never be able to have 100% of our code strict, we can at the very least do it for all of our tests. This ensures that our tests are using our API with the types as intended by the test author, and not silently be cast to what our API requires.
29 lines
802 B
PHP
29 lines
802 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class Issue2778Test extends TestCase
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private static $testbook = 'tests/data/Reader/XLSX/issue.2778.xlsx';
|
|
|
|
public function testIssue2778(): void
|
|
{
|
|
$filename = self::$testbook;
|
|
$reader = new Xlsx();
|
|
$spreadsheet = $reader->load($filename);
|
|
$sheet = $spreadsheet->getActiveSheet();
|
|
self::assertSame(6, $sheet->getCell('D1')->getCalculatedValue());
|
|
self::assertSame(63, $sheet->getCell('F1')->getCalculatedValue());
|
|
self::assertSame(10, $sheet->getCell('C10')->getCalculatedValue());
|
|
$spreadsheet->disconnectWorksheets();
|
|
}
|
|
}
|