Travis & PHPUnit tweaks

This commit is contained in:
Synchro 2015-11-10 15:17:46 +01:00
parent a139b96368
commit 12805da50a
4 changed files with 12 additions and 9 deletions

View File

@ -14,7 +14,7 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -y -qq postfix
install:
- composer install
- composer update
before_script:
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
@ -27,7 +27,7 @@ before_script:
- sudo cp fakesendmail.sh /usr/sbin/sendmail
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > $(php --ini|grep -m 1 "ini files in:"|cut -d ":" -f 2)/sendmail.ini
script:
- phpunit --configuration ../travis.phpunit.xml.dist
- phpunit --configuration ../travis.phpunit.xml.dist --bootstrap tests/bootstrap.php
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml

10
test/bootstrap.php Normal file
View File

@ -0,0 +1,10 @@
<?php
/**
* PHPUnit bootstrap file
*/
require_once '../vendor/autoload.php';
spl_autoload_register(
function ($class) {
require_once strtr($class, '\\_', '//') . '.php';
}
);

View File

@ -13,8 +13,6 @@
namespace PHPMailer\PHPMailer;
require '../vendor/autoload.php';
/**
* PHPMailer - PHP email transport unit test class.
*/

View File

@ -16,11 +16,6 @@
<directory>./test/</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory suffix=".php">./extras</directory>
</blacklist>
</filter>
<groups>
<exclude>
<group>languages</group>