public function testLimit()
 {
     $obj = new ListLogEventsOptions();
     $this->assertEquals(null, $obj->getLimit());
     $this->assertEquals($obj, $obj->setLimit(100));
     $this->assertEquals(100, $obj->getLimit());
 }
 /**
  * @param ListLogEventsOptions $options
  * @return array
  */
 private function getParamsFromOptions($options)
 {
     $params = array('list' => 'logevents');
     $params['leprop'] = 'title|ids|type|user|timestamp|comment|details';
     if ($options->getType() !== '') {
         $params['letype'] = $options->getType();
     }
     if ($options->getAction() !== '') {
         $params['leaction'] = $options->getAction();
     }
     if ($options->getStart() !== '') {
         $params['lestart'] = $options->getStart();
     }
     if ($options->getEnd() !== '') {
         $params['leend'] = $options->getEnd();
     }
     if ($options->getTitle() !== '') {
         $params['letitle'] = $options->getTitle();
     }
     if ($options->getUser() !== '') {
         $params['leuser'] = $options->getUser();
     }
     if ($options->getNamespace() !== null) {
         $params['lenamespace'] = $options->getNamespace();
     }
     return $params;
 }