Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrites Mail_Parse::parsePriority function #491

Merged
merged 3 commits into from Jun 18, 2014
Merged

Rewrites Mail_Parse::parsePriority function #491

merged 3 commits into from Jun 18, 2014

Conversation

clonemeagain
Copy link
Contributor

Replaced previous pull request #348
Includes best function as tested/defined. 4526e54

Includes Test class as described by greezy #348 (comment) cb316f6

Tested repeatedly with old function (failed miserably), and new function, passed beautifully. Test designed to determine best function, modified to ensure function operates as intended, original test https://gist.github.com/clonemeagain/8066113
Future tests should therefore pass once entire pull request is merged. I'm liking the idea of adding tests!

Also, includes modification to test suite allowing individual test suite to run, instead of forcing ALL tests to run sequentially. Only useful for testing tests.. but still useful. 4822b86

Original issue: #343

Best version of #348

static keyword added to enable strict test mode.
Allow tester to run single test by specifying it on command line: php run-tests.php TestMyThing etc.

Still works for normal tests.
Creates a regression test for the parsePriority function, as suggested by GreezyBacon #348 (comment)
$priority=3;
}
return $priority;
static function parsePriority($header=null){
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static keyword was added purely to pass the tests.. and as this function is only ever called statically, it makes sense too.
https://github.com/osTicket/osTicket-1.8/search?q=parsePriority&ref=cmdform

protich added a commit that referenced this pull request Jun 18, 2014
Rewrites Mail_Parse::parsePriority function

Reviewed-By: Peter & Jared
@protich protich merged commit 8db5391 into osTicket:develop Jun 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants