public function testRun() { $whiteList = ['test' . rand(), 'test' . rand()]; $extensions = ['test' . rand(), 'test' . rand()]; $this->_wrapper->expects($this->once())->method('getDefaults')->will($this->returnValue([])); $expectedCliEmulation = ['files' => $whiteList, 'standard' => [self::RULE_SET], 'extensions' => $extensions, 'reportFile' => self::REPORT_FILE, 'warningSeverity' => 0, 'reports' => ['checkstyle' => null]]; $this->_tool->setExtensions($extensions); $this->_wrapper->expects($this->once())->method('setValues')->with($this->equalTo($expectedCliEmulation)); $this->_wrapper->expects($this->once())->method('process'); $this->_tool->run($whiteList); }
public function testRun() { $whiteList = array('test' . rand(), 'test' . rand()); $blackList = array('test' . rand(), 'test' . rand()); $extensions = array('test' . rand(), 'test' . rand()); $this->_wrapper->expects($this->once())->method('getDefaults')->will($this->returnValue(array())); $expectedCliEmulation = array('files' => $whiteList, 'standard' => self::RULE_SET, 'ignored' => $blackList, 'extensions' => $extensions, 'reportFile' => self::REPORT_FILE, 'warningSeverity' => 0, 'reports' => array('checkstyle' => null)); $this->_wrapper->expects($this->once())->method('setValues')->with($this->equalTo($expectedCliEmulation)); $this->_wrapper->expects($this->once())->method('process'); $this->_tool->run($whiteList, $blackList, $extensions); }