Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Fixed Travis and PhpUnit tests. #82

Open
wants to merge 2 commits into
base: feature/fix-travis
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Travis doesn't pass php 5.3 anymore, neither Omeka 2.1.
language: php

php:
- 5.2
- 5.3
#- 5.4
#- 5.2
#- 5.3
- 5.4
- 5.5
- 5.6
- 7.0

env:
#- OMEKA_BRANCH=stable-1.5
- OMEKA_BRANCH=stable-2.0
#- OMEKA_BRANCH=stable-2.0
#- OMEKA_BRANCH=stable-2.1
- OMEKA_BRANCH=stable-2.2
- OMEKA_BRANCH=stable-2.3
- OMEKA_BRANCH=stable-2.4

before_script:
- ./travis_setup.sh
Expand Down
2 changes: 1 addition & 1 deletion NeatlineTimePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function hookInstall()
`creator_id` INT UNSIGNED NOT NULL,
`public` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`featured` TINYINT(1) NOT NULL DEFAULT '0',
`added` timestamp NOT NULL default '0000-00-00 00:00:00',
`added` timestamp NOT NULL default '2000-01-01 00:00:00',
`modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=innodb DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
Expand Down
1 change: 0 additions & 1 deletion tests/NeatlineTime_Test_AppTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/**
* Testing helper class.
*/
require_once '../NeatlineTimePlugin.php';

class NeatlineTime_Test_AppTestCase extends Omeka_Test_AppTestCase
{
Expand Down
7 changes: 7 additions & 0 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@
highLowerBound="70" />
</logging>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">.</directory>
<exclude />
</whitelist>
</filter>

</phpunit>
4 changes: 2 additions & 2 deletions tests/phpunit_travis.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<phpunit bootstrap="bootstrap.php"
convertErrorsToExceptions="false"
convertWarningsToExceptions="false"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
colors="true"
verbose="true">

Expand Down
3 changes: 1 addition & 2 deletions travis_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ fi
echo "Plugin Directory: $PLUGIN_DIR"
echo "Omeka Directory: $OMEKA_DIR"

cd $PLUGIN_DIR/tests/
cat $(which phpunit)
phpunit --configuration phpunit_travis.xml
cd tests/ && phpunit --configuration phpunit_travis.xml