public function itOnlyLogsErrorsAndWarningsInTheLogStack() { expect($this->backend_logger)->log()->count(4); $this->logger->error("this is an error"); $this->logger->warn("this is a warning"); $this->logger->info("this is an info"); $this->logger->debug("this is a debug"); $expected_logs = array("[error] this is an error", "[warning] this is a warning"); $this->assertEqual($this->logger->getAllLogs(), $expected_logs); }
private function addSummaryCommentChangeset(Tracker_Artifact $artifact, PFUser $user, Tracker_Artifact_Changeset $from_changeset) { $original_artifact = $from_changeset->getArtifact(); $comment = $this->logger->getAllLogs(); $comment[] = $GLOBALS['Language']->getText('plugin_tracker_artifact', 'copy_artifact_finished', array($original_artifact->getTracker()->getItemName(), $original_artifact->getId())); $artifact->createNewChangeset(array(), implode("\n", $comment), $user, true, Tracker_Artifact_Changeset_Comment::TEXT_COMMENT); }