Skip to content

Commit efb3661

Browse files
committed
Testing setup
1 parent c06e045 commit efb3661

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed

.coveralls.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage_clover: tests/Logs/clover.xml
2+
json_path: tests/Logs/coveralls-upload.json
3+
service_name: travis-ci

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: php
2+
dist: trusty
3+
php:
4+
- '5.6'
5+
- '7.0'
6+
- '7.1'
7+
- '7.2'
8+
- 'hhvm'
9+
os:
10+
- linux
11+
- osx
12+
- windows
13+
install:
14+
- composer update
15+
script:
16+
- ./vendor/bin/phpunit --coverage-clover ./tests/Logs/clover.xml
17+
- ./vendor/bin/psalm
18+
after_script:
19+
- php vendor/bin/php-coveralls -v

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
}
1111
],
1212
"require": {},
13+
"require-dev": {
14+
"phpunit/phpunit": "^5.7",
15+
"satooshi/php-coveralls": "^2.0"
16+
},
1317
"autoload": {
1418
"psr-4": {
1519
"DivineOmega\\HCLParser\\": "./src/"

phpunit.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false">
11+
<testsuites>
12+
<testsuite name="Unit Tests">
13+
<directory suffix="Test.php">./tests/Unit</directory>
14+
<directory suffix="Test.php">./tests/Integration</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src</directory>
20+
<exclude>
21+
<directory suffix=".php">src/Examples</directory>
22+
</exclude>
23+
</whitelist>
24+
</filter>
25+
<php>
26+
27+
</php>
28+
</phpunit>

tests/Unit/BasicUsageTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
use PHPUnit\Framework\TestCase;
4+
5+
class BasicUsageTest extends TestCase
6+
{
7+
public function testBasicParsing()
8+
{
9+
10+
}
11+
12+
}

0 commit comments

Comments
 (0)