/**
  * @dataProvider provideValidConstruction
  */
 public function testValidConstruction($sum, $minor, $bot)
 {
     $flags = new EditInfo($sum, $minor, $bot);
     $this->assertEquals($sum, $flags->getSummary());
     $this->assertEquals($minor, $flags->getMinor());
     $this->assertEquals($bot, $flags->getBot());
 }
Esempio n. 2
0
 private function getEditInfoParams(EditInfo $editInfo)
 {
     $params = array();
     if ($editInfo->getSummary()) {
         $params['summary'] = $editInfo->getSummary();
     }
     if ($editInfo->getMinor()) {
         $params['minor'] = true;
     }
     if ($editInfo->getBot()) {
         $params['bot'] = true;
         $params['assert'] = 'bot';
     }
     return $params;
 }