diff --git a/.gitattributes b/.gitattributes index 475f5f2..89eb187 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,3 +4,4 @@ /.gitignore export-ignore /.travis.yml export-ignore /.scrutinizer.yml export-ignore +/codecov.yml export-ignore diff --git a/.travis.yml b/.travis.yml index 72230bd..bd7316f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ matrix: env: DB=PGSQL PHPUNIT_TEST=1 - php: 7.1 env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1 + - php: 7.2 + env: DB=MYSQL PHPUNIT_TEST=1 before_script: - phpenv rehash @@ -21,7 +23,7 @@ before_script: script: - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi - - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src/ tests/ ; fi + - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ *.php; fi after_success: - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi diff --git a/composer.json b/composer.json index 7cda0d1..d69083e 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,14 @@ { "name": "silverstripe/comments", "description": "This module provides commenting functionality for Pages and other DataObjects on your SilverStripe site.", - "type": "silverstripe-module", + "type": "silverstripe-vendormodule", "keywords": ["silverstripe", "comments"], "authors": [{ "name": "Will Rossiter", "email": "will@fullscreen.io" }], "require": { - "silverstripe/framework": "^4.0@dev", + "silverstripe/framework": "^4.0", "colymba/gridfield-bulk-editing-tools": "^3.0" }, "suggest": { @@ -22,7 +22,11 @@ "extra": { "branch-alias": { "dev-master": "3.x-dev" - } + }, + "expose": [ + "css", + "javascript" + ] }, "scripts": { "lint": "vendor/bin/phpcs src/ tests/", diff --git a/tests/CommentAdminTest.php b/tests/CommentAdminTest.php index 63d1d8d..5f9a2a3 100644 --- a/tests/CommentAdminTest.php +++ b/tests/CommentAdminTest.php @@ -5,13 +5,9 @@ namespace SilverStripe\Comments\Tests; use SilverStripe\Comments\Admin\CommentAdmin; use SilverStripe\Dev\SapphireTest; use SilverStripe\i18n\i18n; -use SilverStripe\Security\Security; class CommentAdminTest extends SapphireTest { - /** - * {@inheritDoc} - */ protected $usesDatabase = true; public function testProvidePermissions() @@ -23,7 +19,7 @@ class CommentAdminTest extends SapphireTest $expected = array( 'CMS_ACCESS_CommentAdmin' => array( 'name' => 'Accès à la section Commentaires', - 'category' => 'CMS Access' // missing in core + 'category' => 'Accès au CMS', ) ); diff --git a/tests/Stubs/CommentableItemController.php b/tests/Stubs/CommentableItemController.php index 211e20a..ee0538f 100644 --- a/tests/Stubs/CommentableItemController.php +++ b/tests/Stubs/CommentableItemController.php @@ -2,7 +2,6 @@ namespace SilverStripe\Comments\Tests\Stubs; -use SilverStripe\Comments\Tests\Stubs\CommentableItem; use SilverStripe\Control\Controller; use SilverStripe\Dev\TestOnly; diff --git a/tests/Stubs/CommentableItemDisabled.php b/tests/Stubs/CommentableItemDisabled.php index c5c4402..6a7dece 100644 --- a/tests/Stubs/CommentableItemDisabled.php +++ b/tests/Stubs/CommentableItemDisabled.php @@ -2,8 +2,6 @@ namespace SilverStripe\Comments\Tests\Stubs; -use SilverStripe\Comments\Tests\Stubs\CommentableItem; - class CommentableItemDisabled extends CommentableItem { private static $defaults = array( @@ -11,4 +9,6 @@ class CommentableItemDisabled extends CommentableItem 'ModerationRequired' => 'None', 'CommentsRequireLogin' => false ); + + private static $table_name = 'CommentableItemDisabled'; } diff --git a/tests/Stubs/CommentableItemEnabled.php b/tests/Stubs/CommentableItemEnabled.php index 5489827..4b9b766 100644 --- a/tests/Stubs/CommentableItemEnabled.php +++ b/tests/Stubs/CommentableItemEnabled.php @@ -2,8 +2,6 @@ namespace SilverStripe\Comments\Tests\Stubs; -use SilverStripe\Comments\Tests\Stubs\CommentableItem; - class CommentableItemEnabled extends CommentableItem { private static $defaults = array( @@ -11,4 +9,6 @@ class CommentableItemEnabled extends CommentableItem 'ModerationRequired' => 'Required', 'CommentsRequireLogin' => true ); + + private static $table_name = 'CommentableItemEnabled'; }