Merge branch 'master' of github.com:roundcube/roundcubemail

pull/279/head
Aleksander Machniak 10 years ago
commit 1cb6e91e99

@ -99,8 +99,9 @@ if (!preg_match($regexp, $path)) {
spl_autoload_register('rcube_autoload');
// set PEAR error handling (will also load the PEAR main class)
@PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'rcube_pear_error');
if (class_exists('PEAR')) {
@PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'rcube_pear_error');
}
/**

@ -32,6 +32,6 @@ class Selenium_Mail_Getunread extends Selenium_Test
$this->assertHasClass('unread', $li);
$badge = $this->byCssSelector('.folderlist li.inbox span.unreadcount');
$this->assertEquals(strval($this->msgcount), $badge->text());
$this->assertEquals(strval($this->msgcount), $this->getText($badge));
}
}

@ -42,7 +42,7 @@ class Selenium_Mail_List extends Selenium_Test
$this->assertHasClass('unread', $row);
$subject = $this->byCssSelector('.messagelist tbody tr:first-child td.subject');
$this->assertEquals('Lines', $subject->text());
$this->assertEquals('Lines', $this->getText($subject));
$icon = $this->byCssSelector('.messagelist tbody tr:first-child td.status span');
$this->assertHasClass('unread', $icon);

@ -337,6 +337,11 @@ class Selenium_Test extends PHPUnit_Extensions_Selenium2TestCase
return $response;
}
protected function getText($element)
{
return $element->text() ?: $element->attribute('textContent');
}
protected function assertHasClass($classname, $element)
{
$this->assertContains($classname, $element->attribute('class'));

Loading…
Cancel
Save