Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Worksheet\Table; ..

Decoded Output download

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Worksheet\Table;

use PhpOffice\PhpSpreadsheet\Worksheet\Table;

class RemoveTableTest extends SetupTeardown
{
    private const INITIAL_RANGE = 'H2:O256';

    public function testRemoveTable(): void
    {
        $sheet = $this->getSheet();

        $table = new Table(self::INITIAL_RANGE);
        $table->setName('Table1');
        $sheet->addTable($table);

        self::assertEquals(1, $sheet->getTableCollection()->count());

        $sheet->removeTableByName('table1'); // case insensitive
        self::assertEquals(0, $sheet->getTableCollection()->count());
    }

    public function testRemoveCollection(): void
    {
        $sheet = $this->getSheet();

        $table = new Table(self::INITIAL_RANGE);
        $table->setName('Table1');
        $sheet->addTable($table);

        self::assertEquals(1, $sheet->getTableCollection()->count());

        $sheet->removeTableCollection();
        self::assertEquals(0, $sheet->getTableCollection()->count());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Worksheet\Table;

use PhpOffice\PhpSpreadsheet\Worksheet\Table;

class RemoveTableTest extends SetupTeardown
{
    private const INITIAL_RANGE = 'H2:O256';

    public function testRemoveTable(): void
    {
        $sheet = $this->getSheet();

        $table = new Table(self::INITIAL_RANGE);
        $table->setName('Table1');
        $sheet->addTable($table);

        self::assertEquals(1, $sheet->getTableCollection()->count());

        $sheet->removeTableByName('table1'); // case insensitive
        self::assertEquals(0, $sheet->getTableCollection()->count());
    }

    public function testRemoveCollection(): void
    {
        $sheet = $this->getSheet();

        $table = new Table(self::INITIAL_RANGE);
        $table->setName('Table1');
        $sheet->addTable($table);

        self::assertEquals(1, $sheet->getTableCollection()->count());

        $sheet->removeTableCollection();
        self::assertEquals(0, $sheet->getTableCollection()->count());
    }
}

Function Calls

None

Variables

None

Stats

MD5 34cfd0e727e05b4461c728ec156d4ceb
Eval Count 0
Decode Time 97 ms