Skip to content

Commit

Permalink
travis file added. Unittests config file, bootstrap added.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailatkurt committed Jul 4, 2018
1 parent d31ee0d commit 336e472
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: php

php:
- 7.2

services:
- docker

before_install:
- composer self-update
- composer clear-cache
- composer update --no-interaction --no-ansi --no-suggest --optimize-autoloader --prefer-stable

script:
- composer install
- phpunit --configuration tests/unittests/phpunit.xml tests/unittests
3 changes: 3 additions & 0 deletions tests/unittests/Bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php';
26 changes: 26 additions & 0 deletions tests/unittests/phpunit.xml
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"
backupGlobals="false"
backupStaticAttributes="false"
verbose="true"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true">
<testsuite name="Cash Machine Code Challenge">
<exclude>../../bootstrap</exclude>
</testsuite>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true" addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-text" target="php://stdout" showOnlySummary="true"/>
<log type="coverage-clover" target="../../reports/phpunit.coverage.xml"/>
<log type="junit" target="../../reports/phpunit.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>

0 comments on commit 336e472

Please sign in to comment.