Skip to content

Instantly share code, notes, and snippets.

@raphaelstolt
Created January 19, 2010 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raphaelstolt/281297 to your computer and use it in GitHub Desktop.
Save raphaelstolt/281297 to your computer and use it in GitHub Desktop.
An 'exploratory' patch for the PHPUnit_Extension_TicketListener class
Index: TicketListener.php
===================================================================
--- TicketListener.php
+++ TicketListener.php
@@ -207,14 +207,16 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
} else {
$adjustTicket = TRUE;
}
+
+ $ticketInfo = $this->getTicketInfo($ticket);
- if ($adjustTicket && in_array($ticketInfo[3]['status'], $ifStatus)) {
+ if ($adjustTicket && in_array($ticketInfo['status'], $ifStatus)) {
$this->updateTicket($ticket, $newStatus, $message, $resolution);
}
}
}
}
-
+ abstract protected function getTicketInfo($ticketId);
abstract protected function updateTicket($ticketId, $newStatus, $message, $resolution);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment