Merge pull request #222 from creative-commoners/pulls/2.0/vendorise

NEW Convert to vendor module, add table_name to test stubs and add PHP 7.2 to travis
This commit is contained in:
Daniel Hensby 2017-12-13 12:07:34 +00:00 committed by GitHub
commit 118de6b595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 14 deletions

1
.gitattributes vendored
View File

@ -4,3 +4,4 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/.scrutinizer.yml export-ignore
/codecov.yml export-ignore

View File

@ -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

View File

@ -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/",

View File

@ -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',
)
);

View File

@ -2,7 +2,6 @@
namespace SilverStripe\Comments\Tests\Stubs;
use SilverStripe\Comments\Tests\Stubs\CommentableItem;
use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;

View File

@ -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';
}

View File

@ -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';
}