Browse Source

Merge pull request #304 from jonathangreen/travis

Added codesniffer to travisci
pull/300/merge
Jonathan Green 12 years ago
parent
commit
dea6d984dd
  1. 4
      .travis.yml
  2. 4
      includes/object_properties.form.inc
  3. 2
      includes/tuque_wrapper.inc
  4. 5
      islandora.install
  5. 2
      islandora.module
  6. 3
      tests/travis_setup.sh
  7. 3
      tests/web_test_case.inc
  8. 8
      theme/islandora-objects.tpl.php

4
.travis.yml

@ -10,5 +10,7 @@ env:
before_install:
- $TRAVIS_BUILD_DIR/tests/travis_setup.sh
- cd $HOME/drupal-*
script:
script:
- ant -buildfile sites/all/modules/islandora/build.xml lint
- drush dcs sites/all/modules/islandora
- drush test-run --uri=http://localhost:8081 Islandora

4
includes/object_properties.form.inc

@ -43,14 +43,14 @@ function islandora_object_properties_form(array $form, array &$form_state, Fedor
'#title' => t('Owner'),
'#default_value' => $object->owner,
'#required' => FALSE,
'#description' => t('The owner\'s account name'),
'#description' => t("The owner's account name"),
'#type' => 'textfield',
),
'object_state' => array(
'#title' => t('State'),
'#default_value' => $object->state,
'#required' => TRUE,
'#description' => t('The object\'s state (active, inactive or deleted)'),
'#description' => t("The object's state (active, inactive or deleted)"),
'#type' => 'select',
'#options' => array('A' => 'Active', 'I' => 'Inactive', 'D' => 'Deleted'),
),

2
includes/tuque_wrapper.inc

@ -36,7 +36,7 @@ $islandora_module_path = drupal_get_path('module', 'islandora');
*/
function islandora_alter_object(AbstractFedoraObject $object, array &$context) {
module_load_include('inc', 'islandora', 'includes/utilities');
drupal_alter(islandora_build_hook_list('islandora_object', $object->models) ,$object, $context);
drupal_alter(islandora_build_hook_list('islandora_object', $object->models), $object, $context);
}
/**

5
islandora.install

@ -10,13 +10,14 @@
*/
function islandora_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
// Ensure translations don't break at install time.
$t = get_t();
if (!class_exists('XSLTProcessor', FALSE)) {
$requirements['islandora_xsltprocessor']['title'] = $t('Islandora XSLTProcessor Prerequisite');
$requirements['islandora_xsltprocessor']['value'] = $t('Not installed');
$link = l($t('PHP XSL extension'), 'http://us2.php.net/manual/en/book.xsl.php', array('attributes' => array('target'=>'_blank')));
$link = l($t('PHP XSL extension'), 'http://us2.php.net/manual/en/book.xsl.php', array('attributes' => array('target' => '_blank')));
$requirements['islandora_xsltprocessor']['description'] = $t('The !xsllink is required. Check your installed PHP extensions and php.ini file.', array('!xsllink' => $link));
$requirements['islandora_xsltprocessor']['severity'] = REQUIREMENT_ERROR;
}

2
islandora.module

@ -120,7 +120,7 @@ function islandora_menu() {
FEDORA_METADATA_EDIT,
FEDORA_ADD_DS,
FEDORA_PURGE,
FEDORA_INGEST
FEDORA_INGEST,
), 2),
);

3
tests/travis_setup.sh

@ -13,6 +13,7 @@ export CATALINA_HOME='.'
cd $HOME
pyrus channel-discover pear.drush.org
pyrus install drush/drush
pyrus install pear/PHP_CodeSniffer
phpenv rehash
drush dl --yes drupal
cd drupal-*
@ -22,6 +23,8 @@ ln -s $TRAVIS_BUILD_DIR sites/all/modules/islandora
mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/islandora/tests/test_config.ini
mkdir sites/all/libraries
ln -s $HOME/tuque sites/all/libraries/tuque
drush dl --yes coder
drush en --yes coder_review
drush en --yes simpletest
drush en --user=1 --yes islandora
drush cc all

3
tests/web_test_case.inc

@ -18,7 +18,8 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
// Always enable islandora.
$args[] = 'islandora';
parent::setUp($args);
// Its possible test are running before class autoloading
// Its possible test are running before class autoloading.
module_load_include('inc', 'islandora', 'includes/tuque');
module_load_include('inc', 'islandora', 'includes/tuque_wrapper');

8
theme/islandora-objects.tpl.php

@ -7,7 +7,13 @@
?>
<div class="islandora-objects clearfix">
<span class="islandora-objects-display-switch">
<?php print theme('links', array('links' => $display_links, 'attributes' => array('class' => array('links', 'inline')))); ?>
<?php
print theme('links', array(
'links' => $display_links,
'attributes' => array('class' => array('links', 'inline')),
)
);
?>
</span>
<?php print $pager; ?>
<?php print $content; ?>

Loading…
Cancel
Save