Skip to content

Commit

Permalink
Fix unit tests on HHVM
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoirotte committed Sep 16, 2016
1 parent 59897a1 commit 99e029b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ php:
- nightly
- hhvm

matrix:
allow_failures:
- php: hhvm

notifications:
email: false
irc: "irc.iiens.net#Erebot"
Expand Down
12 changes: 9 additions & 3 deletions tests/ErebotIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,16 @@ public function testUsingDefaultGroupWithChannelOverride()
$event = $this->_mockPrivateText('test', '!tv 23h42 foo');
$this->_module->handleTv($this->_eventHandler, $event);

// The format changed with ICU 50-rc / CLDR 22.
// HHVM does not seem to rely on ICU's formats at all for dates/times.
// Also, ICU's format changed somewhat starting with ICU 50-rc.
// See http://bugs.icu-project.org/trac/changeset/32275/icu/trunk/source/data/locales/en.txt
// for more information.
if (version_compare(INTL_ICU_DATA_VERSION, '50', '>=')) {
// for the commit that introduced this format change.
if (defined('HHVM_VERSION')) {
$expected = "PRIVMSG test :TV programs for ".
"\0371985 11 28 23:42:00\037: ".
"\002foo\002: foo (17:23 - 17:42) - ".
"\002bar\002: bar (17:23 - 17:42)";
} elseif (version_compare(INTL_ICU_DATA_VERSION, '50', '>=')) {
$expected = "PRIVMSG test :TV programs for ".
"\037November 28, 1985 at 11:42:00 PM\037: ".
"\002foo\002: foo (17:23 - 17:42) - ".
Expand Down

0 comments on commit 99e029b

Please sign in to comment.