Merge pull request #206 from creative-commoners/pulls/2.1/remove-broken-i18n-tests

FIX Remove providePermissions tests and update Travis build configuration
This commit is contained in:
Daniel Hensby 2017-06-15 19:24:00 +01:00 committed by GitHub
commit bd5b007394
2 changed files with 6 additions and 37 deletions

View File

@ -11,15 +11,13 @@ php:
- 5.3 - 5.3
- 5.4 - 5.4
- 5.5 - 5.5
- 5.6
- 7.0
before_install: before_install:
- pip install --user codecov - pip install --user codecov
env: env:
global: global:
- DB=MYSQL CORE_RELEASE=3.1 - DB=MYSQL CORE_RELEASE=3.5
- MODULE_PATH=comments - MODULE_PATH=comments
# Set to 1 in the matrix to enable code coverage # Set to 1 in the matrix to enable code coverage
@ -29,15 +27,13 @@ matrix:
include: include:
- php: 5.6 - php: 5.6
#CommentsListTest breaks with this env: DB=MYSQL CORE_RELEASE=3.2 COVERAGE=1 #CommentsListTest breaks with this env: DB=MYSQL CORE_RELEASE=3.2 COVERAGE=1
env: DB=SQLITE CORE_RELEASE=3.2 COVERAGE=1 env: DB=SQLITE CORE_RELEASE=3.5 COVERAGE=1
- php: 7.1
env: DB=MYSQL CORE_RELEASE=3.6
- php: 5.6 - php: 5.6
env: DB=PGSQL CORE_RELEASE=3.5
- php: 7.1
env: DB=MYSQL CORE_RELEASE=3 env: DB=MYSQL CORE_RELEASE=3
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3.1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3.2
allow_failures:
- php: 7.0
before_script: before_script:
- phpenv rehash - phpenv rehash

View File

@ -2,35 +2,8 @@
class CommentAdminTest extends SapphireTest class CommentAdminTest extends SapphireTest
{ {
protected $usesDatabase = true; protected $usesDatabase = true;
public function testProvidePermissions()
{
$commentAdmin = new CommentAdmin();
$locale = i18n::get_locale();
i18n::set_locale('fr');
$expected = array(
'CMS_ACCESS_CommentAdmin' => array(
# FIXME - this is a bug, missing from lang.yml files
'name' => 'Access to \'Comments\' section',
'category' => 'Accès au CMS'
)
);
$this->assertEquals($expected, $commentAdmin->providePermissions());
i18n::set_locale($locale);
$expected = array(
'CMS_ACCESS_CommentAdmin' => array(
# FIXME - this is a bug, missing from lang.yml files
'name' => 'Access to \'Comments\' section',
'category' => 'CMS Access'
)
);
$this->assertEquals($expected, $commentAdmin->providePermissions());
}
public function testGetEditForm() public function testGetEditForm()
{ {
$commentAdmin = new CommentAdmin(); $commentAdmin = new CommentAdmin();