mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-02 18:08:58 +00:00
Respect PSR-0 with matching folder name and namespace PhpSpreadsheetTests
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace PhpSpreadsheetTests\Worksheet;
|
||||
|
||||
use PhpSpreadsheet\Worksheet;
|
||||
use PhpSpreadsheet\Worksheet\Column;
|
||||
use PhpSpreadsheet\Worksheet\ColumnCellIterator;
|
||||
|
||||
class WorksheetColumnTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public $mockWorksheet;
|
||||
public $mockColumn;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->mockWorksheet = $this->getMockBuilder(Worksheet::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$this->mockWorksheet->expects($this->any())
|
||||
->method('getHighestRow')
|
||||
->will($this->returnValue(5));
|
||||
}
|
||||
|
||||
public function testInstantiateColumnDefault()
|
||||
{
|
||||
$column = new Column($this->mockWorksheet);
|
||||
$this->assertInstanceOf(Column::class, $column);
|
||||
$columnIndex = $column->getColumnIndex();
|
||||
$this->assertEquals('A', $columnIndex);
|
||||
}
|
||||
|
||||
public function testInstantiateColumnSpecified()
|
||||
{
|
||||
$column = new Column($this->mockWorksheet, 'E');
|
||||
$this->assertInstanceOf(Column::class, $column);
|
||||
$columnIndex = $column->getColumnIndex();
|
||||
$this->assertEquals('E', $columnIndex);
|
||||
}
|
||||
|
||||
public function testGetCellIterator()
|
||||
{
|
||||
$column = new Column($this->mockWorksheet);
|
||||
$cellIterator = $column->getCellIterator();
|
||||
$this->assertInstanceOf(ColumnCellIterator::class, $cellIterator);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user