public function getRow($row = 0, $exceptionAsNull = false) { if (!isset($this->rows[$row])) { if ($exceptionAsNull) { return null; } throw new \Exception('Row number out of bounds.'); } return $this->rows[$row]; }
/** * @expectedException \Exception * expectedExceptionMessage Row number out of bounds. */ public function testGetRowException() { $object = new Table(); $object->getRow(); }