/**
  * @testdox  Verify that getItems() returns a data array with the latest packages and coverage changes noted
  *
  * @covers   \Joomla\Status\Model\StatusModel::getItems
  * @uses     \Joomla\Status\Helper
  */
 public function testVerifyThatGetItemsReturnsADataArrayWithLatestPackagesAndCoverageChangesNoted()
 {
     $this->mockDbo->expects($this->any())->method('loadObjectList')->willReturnCallback([$this, 'mockLoadObjectListComplex']);
     $this->mockDbo->expects($this->at(0))->method('loadObject')->willReturnCallback([$this, 'mockLoadObjectApplicationFirst']);
     $this->mockDbo->expects($this->at(1))->method('loadObject')->willReturnCallback([$this, 'mockLoadObjectApplicationSecond']);
     $this->assertInternalType('array', $this->object->getItems());
 }
Пример #2
0
 /**
  * Method to render the view
  *
  * @return  string  The rendered view
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function render()
 {
     $this->setData(['items' => $this->model->getItems()]);
     return parent::render();
 }
Пример #3
0
 /**
  * Method to render the view
  *
  * @return  string  The rendered view
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function render()
 {
     return json_encode($this->model->getItems());
 }