Permalink
Browse files

Add PHPUnit configuration

  • Loading branch information...
1 parent 9e30e0a commit 7cb6599467977e5c5b0f94812a1359a66b8131fe @colinodell colinodell committed May 29, 2015
Showing with 34 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +3 −1 .travis.yml
  3. +1 −1 circle.yml
  4. +29 −0 phpunit.xml.dist
  5. +0 −2 tests/HtmlConverterTest.php
View
@@ -1,3 +1,4 @@
~*
+/build/
vendor
composer.lock
View
@@ -14,4 +14,6 @@ matrix:
sudo: false
-script: phpunit --no-configuration HtmlConverterTest ./tests/HtmlConverterTest.php
+script:
+ - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then vendor/bin/phpunit; fi
+ - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; fi
View
@@ -1,4 +1,4 @@
test:
override:
- - phpunit --no-configuration HtmlConverterTest ./tests/HtmlConverterTest.php
+ - phpunit
View
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="vendor/autoload.php"
+ backupGlobals="false"
+ backupStaticAttributes="false"
+ colors="true"
+ verbose="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false">
+ <testsuites>
+ <testsuite name="HTML To Markdown Test Suite">
+ <directory>tests</directory>
+ </testsuite>
+ </testsuites>
+ <filter>
+ <whitelist>
+ <directory suffix=".php">src/</directory>
+ </whitelist>
+ </filter>
+ <logging>
+ <log type="tap" target="build/report.tap"/>
+ <log type="junit" target="build/report.junit.xml"/>
+ <log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
+ <log type="coverage-text" target="build/coverage.txt"/>
+ <log type="coverage-clover" target="build/logs/clover.xml"/>
+ </logging>
+</phpunit>
@@ -1,7 +1,5 @@
<?php
-require_once dirname(__FILE__) . '/../vendor/autoload.php';
-
use HTMLToMarkdown\HtmlConverter;
class HtmlConverterTest extends PHPUnit_Framework_TestCase

0 comments on commit 7cb6599

Please sign in to comment.