Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaf35fb
commit 30d31e2
Showing
5 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
tests/config.json | ||
tests/clover.xml | ||
vendor | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
language: php | ||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
|
||
env: | ||
global: | ||
- CORE_BRANCH=master | ||
- APP_NAME=files_external_ftp | ||
- DB=sqlite | ||
matrix: | ||
- FTPD=pure-ftpd | ||
- FTPD=proftpd | ||
- FTPD=vsftpd | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -yqq bc $FTPD | ||
- sudo /etc/init.d/$FTPD restart | ||
- if [ "$FTPD" = "vsftpd" ]; then echo "local_enable=YES" | sudo tee -a /etc/vsftpd.conf; echo "write_enable=YES" | sudo tee -a /etc/vsftpd.conf; fi | ||
- sudo /etc/init.d/$FTPD restart | ||
|
||
- pass=$(perl -e 'print crypt("test", "password")') | ||
- sudo useradd -m -p $pass test | ||
|
||
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh | ||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB | ||
- cd ../core | ||
- php occ app:enable $APP_NAME | ||
|
||
script: | ||
# Test lint | ||
- cd ../core/apps/$APP_NAME | ||
- find . -name \*.php -exec php -l "{}" \; | ||
|
||
# Run phpunit tests | ||
- cd tests | ||
- echo '{"host":"localhost","username":"test","password":"test"}' > config.json | ||
- phpunit --configuration phpunit.xml | ||
|
||
# Create coverage report | ||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi" | ||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi" | ||
|
||
matrix: | ||
allow_failures: | ||
- php: hhvm | ||
fast_finish: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
define('PHPUNIT_RUN', 1); | ||
|
||
require_once __DIR__ . '/../../../lib/base.php'; | ||
|
||
if (!class_exists('PHPUnit_Framework_TestCase')) { | ||
require_once('PHPUnit/Autoload.php'); | ||
} | ||
|
||
OC_Hook::clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<phpunit bootstrap="bootstrap.php" | ||
strict="true" | ||
verbose="true" | ||
timeoutForSmallTests="900" | ||
timeoutForMediumTests="900" | ||
timeoutForLargeTests="900" | ||
> | ||
<testsuite name='ownCloud - file external ftp App Tests'> | ||
<directory suffix='.php'>.</directory> | ||
</testsuite> | ||
<!-- filters for code coverage --> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">../../files_external_ftp</directory> | ||
<exclude> | ||
<directory suffix=".php">../../files_external_ftp/tests</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<!-- and this is where your report will be written --> | ||
<log type="coverage-clover" target="./clover.xml"/> | ||
</logging> | ||
</phpunit> | ||
|