Skip to content
This repository was archived by the owner on Sep 14, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
696 commits
Select commit Hold shift + click to select a range
fa23e8a
Added permission check for flag link.
jamescazzetta Jul 2, 2014
451b670
Updated commenting.
jamescazzetta Jul 2, 2014
d814097
Updated commenting.
jamescazzetta Jul 2, 2014
07e2718
flag_help() should use RouteMatchInterface, not Request
Jul 2, 2014
ef67bb9
Merge pull request #26 from md-systems/flag_help-use-routematchinterface
socketwench Jul 2, 2014
f4e2e5b
Replaced conditional row creation/update with db_merge().
jamescazzetta Jul 3, 2014
59a6f6a
Added test that flags a node using different user accounts and checks…
jamescazzetta Jul 3, 2014
3af54ea
Fixed hook requirements to enable successful installation.
jamescazzetta Jul 7, 2014
4f724fe
Fix and simplify flag_counts schema
Berdir Jul 8, 2014
f72df55
Removed getInfo() and deleted unused/missplaced test including it's p…
jamescazzetta Jul 11, 2014
0eaede4
module_invoke_all() has been removed
Berdir Jul 11, 2014
53e12cf
entity_type argument to hook_entity_delete() was removed.
Berdir Jul 11, 2014
66c00b0
Added travis support.
jibran Jul 11, 2014
55413ea
Added PHPCS to .travis.yml and Updated simpetest script.
jibran Jul 13, 2014
723b206
Updated .travis.yml.
jibran Jul 13, 2014
1285e3c
Merge pull request #29 from md-systems/module_invoke_all
socketwench Jul 13, 2014
edd3afb
Fix and simplify merge query
Berdir Jul 14, 2014
ae1b87e
Merge pull request #27 from md-systems/fix-hook-requirements
socketwench Jul 15, 2014
e2ce93e
Merge pull request #28 from md-systems/updated-test-getInfo-removed
socketwench Jul 15, 2014
cea5c45
Merge pull request #30 from md-systems/hook_entity_delete
socketwench Jul 15, 2014
c42d4a9
Updated .travis.yml.
jibran Jul 15, 2014
8ba4715
Updated label to label().
jamescazzetta Jul 15, 2014
e67b6c6
Merge pull request #35 from md-systems/updated-label-getter
socketwench Jul 16, 2014
ea8e05e
Merge pull request #25 from md-systems/fixedFlagDeletionWhenNodeDeleted
socketwench Jul 16, 2014
a2be091
Fixed case of Url class
Berdir Jul 18, 2014
8829acd
Merge pull request #32 from jibran/travis
socketwench Jul 18, 2014
8f774bf
Merge pull request #37 from md-systems/url-case
socketwench Jul 18, 2014
ad0e87f
Changed YAML file names due to https://www.drupal.org/node/2302893
Jul 18, 2014
6d119bf
Fixed broken FlagListController due to module_exists() going away.
Jul 18, 2014
15d623b
Removed trigger module references.
Jul 18, 2014
8027ef9
Fixed deprecated function module_exists(), tests working again.
jamescazzetta Jul 15, 2014
3e8c82b
Fix test group
Berdir Jul 18, 2014
15958e7
Merge pull request #38 from md-systems/fix-module-exists-deprecated
socketwench Jul 18, 2014
a0e30dc
Merge pull request #39 from md-systems/test-group
socketwench Jul 18, 2014
1035ccb
Merge pull request #24 from md-systems/fixedFLagPermissionView
socketwench Jul 18, 2014
3345ca3
Fix redirect on reload controller.
Berdir Jul 14, 2014
f6d736a
Fix the destination path
Berdir Jul 14, 2014
8f518bf
Use route parameter instead of option
Berdir Jul 14, 2014
500a969
fix trailing whitespaces
Berdir Jul 18, 2014
f469062
Fixed flag deletion when user is deleted.
jamescazzetta Jul 2, 2014
00acf5c
Corrected assertions.
jamescazzetta Jul 2, 2014
612089b
Corrected assertions.
jamescazzetta Jul 2, 2014
bcb92bc
Merge pull request #23 from md-systems/fixedFlagDeltionWhenUserIsDeleted
socketwench Jul 18, 2014
eb4995d
Merge pull request #34 from md-systems/redirect
socketwench Jul 18, 2014
fa36241
Clean up automatically generated phpstorm docblock
jmolivas Jul 18, 2014
71d001d
Remove unused class imports
jmolivas Jul 18, 2014
47a87da
Import new classes
jmolivas Jul 18, 2014
9654bd7
Inject Flag service from container
jmolivas Jul 18, 2014
6e347ba
Removed hooks from flag.api.php that were replaced by plugins and eve…
Jul 18, 2014
eb6d298
Replace Drupal static use property flagService
jmolivas Jul 18, 2014
3487adf
Add missing slash
jmolivas Jul 18, 2014
7c2b866
Clean up automatically generated phpstorm docblock
jmolivas Jul 18, 2014
37ec978
Remove unused class imports
jmolivas Jul 18, 2014
cfce22f
Import new classes
jmolivas Jul 18, 2014
6d3649b
Inject Flag service from container
jmolivas Jul 18, 2014
b717ffa
Removed flag_fetch_definition(), flag_get_types(), replaced with Flag…
Jul 18, 2014
8e67976
Replace Drupal static use property flagService
jmolivas Jul 18, 2014
aba8eb9
Add missing slash
jmolivas Jul 18, 2014
7d1d01e
Remove unused class imports
jmolivas Jul 18, 2014
bbba42c
Remove unused paramater
jmolivas Jul 18, 2014
880a9d8
Fix rebase conflicts
jmolivas Jul 18, 2014
b301665
Add missing slash
jmolivas Jul 18, 2014
213536a
Add arguments to service definition
jmolivas Jul 19, 2014
795c597
Remove unused class import
jmolivas Jul 19, 2014
688f27d
Import new classes
jmolivas Jul 19, 2014
7935707
Add class properties
jmolivas Jul 19, 2014
2b5430f
Update class constructor
jmolivas Jul 19, 2014
4889d2b
Add return argument type
jmolivas Jul 19, 2014
772d27c
Remove Drupal static calls
jmolivas Jul 19, 2014
f772fd0
Add return argument type
jmolivas Jul 19, 2014
e21c3c8
Add constructor docblock arguments
jmolivas Jul 19, 2014
9495293
Add constructor docblock
jmolivas Jul 19, 2014
54ed30c
Add create docblock
jmolivas Jul 19, 2014
d40bd29
Merge pull request #41 from jmolivas/flag-service
socketwench Jul 19, 2014
5389baf
Merge pull request #40 from jmolivas/reload-link-controller
socketwench Jul 19, 2014
e9071a3
Fixed FlagService var names and docblocks.
Jul 19, 2014
1da93f0
applied coding standard comments to the Events
martinfrances107 Jul 19, 2014
3498226
Merge pull request #42 from martinfrances107/master
socketwench Jul 19, 2014
2dab894
Updated .gitignore to ignore patch files.
Jul 19, 2014
666b16c
Updated docblocks for annotations and controllers.
Jul 19, 2014
d2657b0
applied coding standard changes ONLY to comments in ActionLink
martinfrances107 Jul 19, 2014
53e3b48
Updated docblocks for Flag and FlagInterface.
Jul 19, 2014
6f9b93d
Updated the docblocks for the Flagging and FlaggingInterface
Jul 19, 2014
4533bef
Merge pull request #44 from martinfrances107/master
socketwench Jul 19, 2014
68634a6
Updated the docblocks for flag events.
Jul 19, 2014
9f32d2b
Updated the docblocks for form classes.
Jul 19, 2014
56f7563
applied coding standard fixes to comments in Flag directory
martinfrances107 Jul 19, 2014
32e2552
Updated docblocks for link types.
Jul 19, 2014
70fef82
Merge branch 'master' of https://github.com/socketwench/flag-drupal8
Jul 19, 2014
6daac9c
Merge pull request #45 from martinfrances107/master
socketwench Jul 19, 2014
447e9c6
Fixed several code style problems.
Jul 20, 2014
2065de0
Merge branch 'master' of https://github.com/socketwench/flag-drupal8
Jul 20, 2014
00a9ede
Fixed additional code style problems in FlagEvents, FlagAddPageForm, …
Jul 20, 2014
4ba7c1c
Fixed even more JS code style problems.
Jul 20, 2014
53d38e6
Fixed a code style problem in flag.js.
Jul 20, 2014
7a73f41
Updated EntityFlagType due to https://www.drupal.org/node/2257811
Jul 20, 2014
c74b2c2
Replaced 'Created by PHPStorm' file docblocks with proper ones.
Jul 23, 2014
eba2e5b
Fixed documentation for ActionLinkPluginManager.
Jul 23, 2014
8a74871
Rename getCancelRoute to getCancelUrl
andypost Jul 28, 2014
55241f7
Merge pull request #50 from andypost/master
socketwench Aug 2, 2014
ac15043
$form_state is now a classed object
gnuget Aug 1, 2014
458ac9c
adding the typehint in the rest of the functions with $form_state
gnuget Aug 1, 2014
aa0b29c
Fix fatal errors when flag_token_info() is called
Berdir Jul 19, 2014
7bdd7c5
Merge pull request #52 from gnuget/master
socketwench Aug 8, 2014
66aaf18
Merge pull request #51 from md-systems/token
socketwench Aug 8, 2014
440b554
Add build passing sign to README.md
jibran Aug 8, 2014
6d0d626
Merge pull request #55 from jibran/build-passing
socketwench Aug 8, 2014
3143616
Referenced class is not an entity access controller (now entity acces…
Berdir Aug 8, 2014
95bea7e
Use new setRedirectUrl() for form redirect
Berdir Aug 8, 2014
f5924ed
Merge pull request #53 from md-systems/small-fixes
socketwench Aug 9, 2014
f23504e
Added flag views argument handler.
Aug 19, 2014
d3503ab
FieldDefinition is now BaseFieldDefinition
Berdir Aug 20, 2014
267ee96
Convert to field_ui_base_route, remove no longer existing bundle keys
Berdir Aug 21, 2014
06e3110
Update redirects and other form_state changes
Berdir Aug 21, 2014
231f51d
Merge pull request #57 from md-systems/base-field-definition
socketwench Aug 21, 2014
6319b8a
Fixed code style issues in flag.views.inc
Aug 21, 2014
ba8667c
Fixed code style issues in flag.api.php.
Aug 22, 2014
10a43e4
Fixed code style issues in flag.tpl.php
Aug 22, 2014
fb4719c
Fixed code style issues in flag.tokens.inc.
Aug 22, 2014
a51e11c
Fixed code style issues in flag.js.
Aug 22, 2014
1afbb9c
Fixed code style issues in flag.views.inc.
Aug 22, 2014
9f05926
Fixed code style issues in ActionLinkType.php.
Aug 23, 2014
879bbd5
Fixed docblocks in FlaggingEvent and FlagService.
Aug 23, 2014
d34d4a3
Fixed code style issues in FlagTypePluginManager.php.
Aug 23, 2014
3a43732
Fixed code style issues in FlaggingConfirmForm.php.
Aug 23, 2014
7998ec8
Fixed docblock issues in several files.
Aug 23, 2014
0e8bd80
Fixed docblocks in several files.
Aug 23, 2014
a92d98b
Fixed further code style issues in UserFlagType, FlagViewsFlaggableAr…
Aug 23, 2014
410c410
Fixed code style issues in NodeFlagType.php.
Aug 23, 2014
dbd972a
Refactored EntityFlagType.php and fixed some docbock issues.
Aug 24, 2014
9253119
Fixed docblocks in ActionLinkTypeBase.php.
Aug 24, 2014
b88f701
Reformatted a long line of commented out code that cuased phpcs to ba…
Aug 24, 2014
e142188
Fixed code style isues in FlagAddForm.php.
Aug 24, 2014
43e067c
Fixed a code style issue, in FlagDeleteForm.php.
Aug 24, 2014
18eaf4f
Fixed a code style issue in FlagEditForm.php.
Aug 24, 2014
de0e6cd
Fixed code style issues in FlagInterface, deleted unused BrokenFlagType.
Aug 24, 2014
72cb772
Fixed docblock and code style issues in FlagService.php.
Aug 26, 2014
3db6ab7
Fixed docblock issues in AJAXLinkController.php.
Aug 26, 2014
258b3a3
Fixed docblock issues in ReloadLinkController.php.
Aug 26, 2014
1103e96
Fixed docblock issues in FlagListController.php.
Aug 26, 2014
ac7f079
Fixed docblock for NodeFlagType.
Aug 27, 2014
84a5f91
Fixed docblock issues in CommentFlagType.php.
Aug 28, 2014
ac1eb7f
Corrected ending newline in Derivative/EntityFlagType.php.
Aug 28, 2014
1d60d31
Updated all array()s to [].
Sep 1, 2014
54db51c
Fixed Flag annotation due to https://www.drupal.org/node/2200867
Sep 1, 2014
ef6e177
Added flag form validation using flag and link type plugins.
Sep 2, 2014
b11dc4c
Fixed broken EntityViewDisplay use statement.
Sep 3, 2014
e262045
Remove unecessary $form_state['controller'] hack
Berdir Sep 3, 2014
407c8c7
Updated more array()s to [] in flag.module.
Sep 4, 2014
2859a2e
Removed flag_get_flag().
Sep 4, 2014
372c7e8
Removed flag_node_insert(), flag_node_update(), and flag_save_flag().
Sep 4, 2014
bfca8a3
Fixed broken machine name validation in flag forms, replaced with fan…
Sep 4, 2014
dfcac13
Removed dead hooks from flag.module, augmented flagging retrieval in …
Sep 4, 2014
a794101
Refactored Flag entity to use getters and setters provided by FlagInt…
Sep 8, 2014
7d6b532
Added .DS_Store to .gitignore because of &^%#%$ Macs.
Sep 8, 2014
921b384
Fixed broken user flags.
Sep 8, 2014
7b13e31
Initial broken Flagging field entry link type.
Sep 10, 2014
a78e6a7
Fixed broken AJAX link type form.
Sep 10, 2014
5d8e166
Initial broken Flagging field entry link type.
Sep 10, 2014
9a52606
Merge branch 'flaggingFieldEntryForm' of https://github.com/socketwen…
Sep 10, 2014
c5d8cd3
Fixed incorrect handlers annotation.
Sep 10, 2014
e24cadf
Remove usage of FormState as an array.
timplunkett Sep 12, 2014
398dba0
Updated routing.
Sep 14, 2014
aff6576
Merge branch 'master' of https://github.com/md-systems/flag-drupal8 i…
Sep 14, 2014
89e7d3f
Merge branch 'md-systems-master'
Sep 14, 2014
b62f2ed
Merge branch 'form_state' of https://github.com/timplunkett/flag-drup…
Sep 14, 2014
de6fa9d
Merge branch 'timplunkett-form_state'
Sep 14, 2014
e23a127
Initial broken Flagging field entry link type.
Sep 10, 2014
5bcac22
Fixed incorrect handlers annotation.
Sep 10, 2014
06fd1c1
Updated routing.
Sep 14, 2014
735671f
Merge branch 'flaggingFieldEntryForm' of https://github.com/socketwen…
Sep 14, 2014
568a208
Working flagging field creation form.
Sep 15, 2014
22ddc0e
Changed getForm() call to include 'add'.
Sep 15, 2014
6ec5bdf
Added edit route for flagging field entry.
Sep 15, 2014
650945e
Fixed broken FlaggingConfirmForm.
Sep 16, 2014
51d499e
Making flagging fields editable.
Sep 16, 2014
5022a30
Flagging field entry delete link (broken).
Sep 16, 2014
27d3795
fixes https://github.com/socketwench/flag-drupal8/issues/64 W- SOD on…
martinfrances107 Sep 16, 2014
8903756
Merge pull request #65 from martinfrances107/master
socketwench Sep 16, 2014
ec95ba3
Partially working delete form route.
Sep 17, 2014
b1c861e
Added link type options for FieldEntry. Cleaned up the FlaggingForm c…
Sep 17, 2014
1b17e77
Added title callbacks for the field entry flagging create and edit form.
Sep 17, 2014
8275b02
Fixed invalid url in watchdog messages and converted deprecated watch…
martinfrances107 Sep 17, 2014
86c934c
Merge pull request #66 from martinfrances107/master
socketwench Sep 17, 2014
2399659
Updated access checks for new AccessResult API, fixes #67"
Berdir Sep 19, 2014
ff6a841
Merge pull request #68 from md-systems/access
socketwench Sep 20, 2014
0a123ba
https://github.com/socketwench/flag-drupal8/issues/69 Three untermina…
martinfrances107 Sep 20, 2014
3e36370
use String::checkPlain
martinfrances107 Sep 20, 2014
c947e26
Merge pull request #70 from martinfrances107/master
socketwench Sep 21, 2014
0ef3c65
Merge pull request #71 from martinfrances107/checkPlain
socketwench Sep 21, 2014
2851443
Updated FieldEntry to use FormState::getValue().
Sep 22, 2014
d2dc2e0
Merge pull request #62 from socketwench/flaggingFieldEntryForm
socketwench Sep 23, 2014
398d3eb
Fixed permissions due to https://www.drupal.org/node/2311427
Sep 23, 2014
5154ccc
Fixed permission name typo that was breaking tests.
Sep 24, 2014
cc93e53
Fixed incorrect role markup in FlagListController.
Sep 24, 2014
43e4f6d
Added documentation to FlagPermissions.
Sep 24, 2014
da7580a
Added validation and changed default values for the EntityFlagType pl…
Sep 24, 2014
126af38
Fixed missing node display permission that was causing tests to fail.
Sep 24, 2014
d2b1927
node_load is deperecated.
martinfrances107 Sep 28, 2014
5f59ba7
node_load is deprecated - bug fix
martinfrances107 Sep 28, 2014
2d12a05
Fixed missing default configuration for ActionLinkTypeBase.
Sep 28, 2014
aa648b0
Added initial confirm form test.
Sep 29, 2014
a17db72
Fixed missing default configuration for ActionLinkTypeBase.
Sep 28, 2014
b567445
Added initial confirm form test.
Sep 29, 2014
ad9f683
Page cache, fieldable
Berdir Sep 30, 2014
bb919ca
Merge pull request #76 from md-systems/master
socketwench Oct 1, 2014
80ba665
Merge pull request #75 from martinfrances107/master
socketwench Oct 1, 2014
8e83d14
Fixed FlagListController WSOD due to https://www.drupal.org/node/2346779
Oct 7, 2014
999140e
Further l() and url() fixes due to https://www.drupal.org/node/2346779
Oct 7, 2014
dd4897e
Prevent errors on content preview.
Berdir Oct 10, 2014
7b65d5c
Merge pull request #80 from md-systems/preview
socketwench Oct 10, 2014
11949d1
Moved preview termination conditional to earlier in flag_entity_view().
Oct 14, 2014
fd64ea3
Added field entry link type test.
Oct 14, 2014
8b02c0a
Fixes for test fails
larowlan Oct 15, 2014
c4d9670
Merge pull request #86 from larowlan/test-fails
socketwench Oct 15, 2014
eb430ab
Fix definition of EntityFlagType
webflo Oct 15, 2014
f043f3e
Merge pull request #87 from webflo/patch-1
socketwench Oct 16, 2014
bdca61e
Removed dead hooks from flag.module.
Oct 18, 2014
c9e1ddf
Mofied Travis CI to use Apache.
Oct 22, 2014
6aff4f9
Corrected incorrect php.ini and vhost.conf copy path.
Oct 22, 2014
88144d4
Fixed broken php.ini copy directive.
Oct 22, 2014
aa0c3aa
Fixed broken drush si DB string.
Oct 22, 2014
e4d6444
Updated Flag and FlagInterface due to https://www.drupal.org/node/235…
Oct 22, 2014
3e14cd0
Updated references to DefaultSingleLazyPluginCollection.
Oct 22, 2014
5068aad
Merge pull request #92 from socketwench/PR-use-apache-for-travis-ci
socketwench Oct 22, 2014
623431e
Rename _content to _controller
Berdir Nov 26, 2014
b9c6fb8
Fixed broken ActionLinkTypeBase due to https://www.drupal.org/node/23…
Dec 4, 2014
a109569
Merge branch 'master' of https://github.com/socketwench/flag-drupal8
Dec 4, 2014
5f404d3
Merge pull request #94 from md-systems/master
socketwench Dec 6, 2014
5a85129
Merge remote-tracking branch 'origin/master'
Dec 6, 2014
8e20471
Replace current_path() with Url::fromRoute()
webflo Dec 11, 2014
b29a39d
Merge pull request #100 from webflo/patch-1
socketwench Dec 13, 2014
5f76895
Merge branch 'master' of https://github.com/socketwench/flag-drupal8
Dec 13, 2014
70e9adb
Fixed broken confirm form destinations.
Dec 13, 2014
43ea519
#97 core doesn't use the term 'plugin bag' any more
Dec 14, 2014
1c9727d
#78: Standardise Mgr suffix.
Dec 14, 2014
c9c97fa
Flag disable confirm form, operation entry.
Dec 17, 2014
1fefd14
Working enable/disable confirm form.
Dec 20, 2014
454b497
Merge branch '106_enableDisableUpdate' into 103_enableDisable
Dec 20, 2014
09e0d2e
Prevented display of links for disabled flags. Invalidated the render…
Dec 22, 2014
abc03e8
Fixed a missing namespace reference breaking Flag::sort().
Dec 23, 2014
4a9e191
Added test for enable/disable feature.
Dec 26, 2014
07769bc
Added comment blocks to FlagEnableDisableTest.
Dec 28, 2014
6373999
Experimental hostname set for Travis CI.
Dec 28, 2014
ea6f44b
Fixed broken .travis.yml
Dec 28, 2014
56eb241
Removed brute force hostname set, replaced with best practice.
Dec 28, 2014
b265855
Set URL in travis site install.
Dec 28, 2014
36e01f3
Fixed travis incorrect url param to drush site-install statement.
Dec 28, 2014
1afeb9f
Set travis virtualhost ServerName directive.
Dec 28, 2014
af27db1
Added FlagDisabledException and appropriate throws in FlagService.
Dec 28, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
*.patch
.DS_Store
95 changes: 95 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
language: php

php:
- 5.4
- 5.5

mysql:
database: drupal
username: root
encoding: utf8

addons:
hosts:
- travis.dev

env:
global:
- MODULE_NAME='flag'
- MODULE_TEST_GROUP='flag'
- DRUPAL_REPO='git://drupalcode.org/project/drupal.git'
- DRUPAL_VERSION='8.0.x'
- PHPCS_VERSION='2.0.*@dev'
- CODER_VERSION='dev-8.x-2.x'

before_install:
# Install Apache and FastCGI extension to connect to PHP-FPM.
- sudo apt-get update > /dev/null
- sudo apt-get install apache2 libapache2-mod-fastcgi > /dev/null
- sudo a2enmod rewrite actions fastcgi alias
- sudo cp -f .travis/vhost.conf /etc/apache2/sites-available/default
- sudo sed -i -e "s,/var/www,`pwd`,g" /etc/apache2/sites-available/default

# Start PHP-FPM. There is no process manager available to start PHP-FPM on
# Travis CI currently, so we have to locate and enable it manually.
- sudo cp $HOME/.phpenv/versions/`php -r "print PHP_VERSION;"`/etc/php-fpm.conf.default $HOME/.phpenv/versions/`php -r "print PHP_VERSION;"`/etc/php-fpm.conf
- $HOME/.phpenv/versions/`php -r "print PHP_VERSION;"`/sbin/php-fpm

# Import the PHP configuration.
- phpenv config-add .travis/php.ini

# Always update Composer to the recent version, otherwise the drush
# installation fails.
- composer selfupdate

install:
# Add composer's global bin directory to the path.
# @see: https://github.com/drush-ops/drush#install---composer
- export PATH="$HOME/.composer/vendor/bin:$PATH"

# install drush globally
- composer global require drush/drush:dev-master
- composer global require squizlabs/php_codesniffer:$PHPCS_VERSION
- composer global require drupal/coder:$CODER_VERSION

before_script:
# Create a Drupal coding standard reference in PHPCS coding standards.
- ln -s ~/.composer/vendor/drupal/coder/coder_sniffer/Drupal ~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards
# Remember the current flag test directory for later use in the Drupal
# installation.
- TESTDIR=$(pwd)
# Navigate out of module directory to prevent blown stack by recursive module
# lookup.
- cd ..

# Create new site, stubbing sendmail path with true to prevent delivery errors
# and manually resolving drush path.
- mysql -e 'create database drupal'
# Download Drupal 8 core.
- git clone --depth 1 --branch $DRUPAL_VERSION $DRUPAL_REPO drupal
- cd drupal
# Install Drupal.
- php -d sendmail_path=`which true` ~/.composer/vendor/bin/drush.php --yes --uri=http://travis.dev site-install --db-url=mysql://root:@localhost/drupal testing

# Reference and enable flag in build site.
- ln -s $TESTDIR modules/$MODULE_NAME
- drush --yes pm-enable simpletest $MODULE_NAME

# Start a web server on port 8080, run in the background; wait for
# initialization. This is temporarly disabled since there are no web tests
# yet.
- sudo apachectl restart
- until netstat -an 2>/dev/null | grep '80.*LISTEN'; do true; done

script:
# Run the Coder sniffer for Flag.
- phpcs --report=full --standard=Drupal ./modules/$MODULE_NAME
# Run the Simpletests for Flag.
- php ./core/scripts/run-tests.sh --php `which php` --concurrency 12 --url http://travis.dev --verbose --color "$MODULE_TEST_GROUP"
# Run the PHPUnit tests.
- ./core/vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/$MODULE_NAME

after_failure:
- echo "Failures detected. Outputing additional logs:"
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/mysql/error.log
16 changes: 16 additions & 0 deletions .travis/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
;
; INI file used to populate PHP settings to Travis CI.
;
; This file is included by the .travis.yml configuration in the root of the
; Flag repository. Configuration set here will be utilized when the testing
; suite is run by Travis CI.
;

; Disable mail sending.
sendmail_path = 'true'

; Set memory limit.
memory_limit = 128M

; Ensure a default of fixing paths is enabled.
cgi.fix_pathinfo = 1
41 changes: 41 additions & 0 deletions .travis/vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Apache VirtualHost configuration used by Travis CI.
#
# This configuration file will be placed into the default Apache configuration
# on test machines, making it so that the localhost URL will be able to serve
# pages generated by PHP-FPM.
#
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
ServerName travis.dev

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

# This directory will be replaced with the appropriate web root by the
# .travis.yml configuration.
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

# Wire up Apache to use Travis CI's php-fpm.
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -idle-timeout 120 -host 127.0.0.1:9000 -pass-header Authorization
</IfModule>

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Loading