Skip to content

Commit

Permalink
fix travis execution
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Dec 5, 2014
1 parent dd9a479 commit 7fbbd23
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6

env:
global:
- CORE_BRANCH=master
- APP_NAME=maps
matrix:
- DB=sqlite

Expand All @@ -18,13 +19,13 @@ branches:
before_install:
# - composer install
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
- bash ./before_install.sh maps $CORE_BRANCH $DB
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../core
- php occ app:enable maps
- php occ app:enable $APP_NAME

script:
# Test lint
- cd apps/maps
- cd apps/$APP_NAME
- sh -c "if [ '$DB' = 'sqlite' ]; then ant test; fi"

# Run phpunit tests
Expand Down
4 changes: 3 additions & 1 deletion appinfo/database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<name>id</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
<autoincrement>1</autoincrement>
<length>41</length>
</field>
Expand Down Expand Up @@ -92,6 +93,7 @@
<name>id</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
<autoincrement>1</autoincrement>
<length>41</length>
</field>
Expand Down Expand Up @@ -135,4 +137,4 @@
</index>
</declaration>
</table>
</database>
</database>
15 changes: 15 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<project name="owncloud-enterprise" basedir="." default="test">

<!-- test - Tests if the code syntax is correct and executes phpunit tests -->
<target name="test">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir=".">
<include name="**/*.php" />
<exclude name="**/l10n/**" />
</fileset>
</apply>

</target>

</project>
6 changes: 1 addition & 5 deletions tests/unit/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<?php

global $RUNTIME_NOAPPS;
$RUNTIME_NOAPPS = true;

define('PHPUNIT_RUN', 1);

require_once __DIR__.'/../../../lib/base.php';
//require_once __DIR__.'/../vendor/autoload.php';
require_once __DIR__.'/../../../../lib/base.php';

if(!class_exists('PHPUnit_Framework_TestCase')) {
require_once('PHPUnit/Autoload.php');
Expand Down

0 comments on commit 7fbbd23

Please sign in to comment.