Expose Sheet::isActive() to provide info about the last active sheet (#405)
This commit is contained in:
1 parent
4a65466b61
commit
7f8b95b2f3
13 files changed
+231
-28
No files matched your search
@@ -18,15 +18,18 @@ class SheetTest extends \PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNextSheetShouldReturnCorrectSheetInfos()
|
||||
public function testReaderShouldReturnCorrectSheetInfos()
|
||||
{
|
||||
$sheets = $this->openFileAndReturnSheets('two_sheets_with_custom_names.xlsx');
|
||||
// NOTE: This spreadsheet has its second tab defined as active
|
||||
$sheets = $this->openFileAndReturnSheets('two_sheets_with_custom_names_and_custom_active_tab.xlsx');
|
||||
|
||||
$this->assertEquals('CustomName1', $sheets[0]->getName());
|
||||
$this->assertEquals(0, $sheets[0]->getIndex());
|
||||
$this->assertFalse($sheets[0]->isActive());
|
||||
|
||||
$this->assertEquals('CustomName2', $sheets[1]->getName());
|
||||
$this->assertEquals(1, $sheets[1]->getIndex());
|
||||
$this->assertTrue($sheets[1]->isActive());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user