mockWorksheet = $this->getMockBuilder('PHPExcel_Worksheet') ->disableOriginalConstructor() ->getMock(); } public function testInstantiateRowDefault() { $row = new PHPExcel_Worksheet_Row($this->mockWorksheet); $this->assertInstanceOf('PHPExcel_Worksheet_Row', $row); $rowIndex = $row->getRowIndex(); $this->assertEquals(1, $rowIndex); } public function testInstantiateRowSpecified() { $row = new PHPExcel_Worksheet_Row($this->mockWorksheet, 5); $this->assertInstanceOf('PHPExcel_Worksheet_Row', $row); $rowIndex = $row->getRowIndex(); $this->assertEquals(5, $rowIndex); } public function testGetCellIterator() { $row = new PHPExcel_Worksheet_Row($this->mockWorksheet); $cellIterator = $row->getCellIterator(); $this->assertInstanceOf('PHPExcel_Worksheet_CellIterator', $cellIterator); } }