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. 2
      .travis.yml
  2. 4
      includes/object_properties.form.inc
  3. 3
      islandora.install
  4. 2
      islandora.module
  5. 3
      tests/travis_setup.sh
  6. 3
      tests/web_test_case.inc
  7. 8
      theme/islandora-objects.tpl.php

2
.travis.yml

@ -11,4 +11,6 @@ before_install:
- $TRAVIS_BUILD_DIR/tests/travis_setup.sh - $TRAVIS_BUILD_DIR/tests/travis_setup.sh
- cd $HOME/drupal-* - 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 - 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'), '#title' => t('Owner'),
'#default_value' => $object->owner, '#default_value' => $object->owner,
'#required' => FALSE, '#required' => FALSE,
'#description' => t('The owner\'s account name'), '#description' => t("The owner's account name"),
'#type' => 'textfield', '#type' => 'textfield',
), ),
'object_state' => array( 'object_state' => array(
'#title' => t('State'), '#title' => t('State'),
'#default_value' => $object->state, '#default_value' => $object->state,
'#required' => TRUE, '#required' => TRUE,
'#description' => t('The object\'s state (active, inactive or deleted)'), '#description' => t("The object's state (active, inactive or deleted)"),
'#type' => 'select', '#type' => 'select',
'#options' => array('A' => 'Active', 'I' => 'Inactive', 'D' => 'Deleted'), '#options' => array('A' => 'Active', 'I' => 'Inactive', 'D' => 'Deleted'),
), ),

3
islandora.install

@ -10,7 +10,8 @@
*/ */
function islandora_requirements($phase) { function islandora_requirements($phase) {
$requirements = array(); $requirements = array();
// Ensure translations don't break at install time
// Ensure translations don't break at install time.
$t = get_t(); $t = get_t();
if (!class_exists('XSLTProcessor', FALSE)) { if (!class_exists('XSLTProcessor', FALSE)) {

2
islandora.module

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

3
tests/travis_setup.sh

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

3
tests/web_test_case.inc

@ -18,7 +18,8 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
// Always enable islandora. // Always enable islandora.
$args[] = 'islandora'; $args[] = 'islandora';
parent::setUp($args); 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');
module_load_include('inc', 'islandora', 'includes/tuque_wrapper'); module_load_include('inc', 'islandora', 'includes/tuque_wrapper');

8
theme/islandora-objects.tpl.php

@ -7,7 +7,13 @@
?> ?>
<div class="islandora-objects clearfix"> <div class="islandora-objects clearfix">
<span class="islandora-objects-display-switch"> <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> </span>
<?php print $pager; ?> <?php print $pager; ?>
<?php print $content; ?> <?php print $content; ?>

Loading…
Cancel
Save