Skip to content

Commit 3eba82d

Browse files
committed
Updated tests and coverage
1 parent 7a633e4 commit 3eba82d

File tree

6 files changed

+43
-40
lines changed

6 files changed

+43
-40
lines changed

.travis.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
language: php
22
php:
3-
- 5.5
4-
- 5.6
3+
- 5.4
4+
- 5.5
5+
- 5.6
56
before_script:
6-
- composer install --no-interaction --prefer-dist
7+
- composer install --no-interaction --prefer-dist
78
script:
8-
- vendor/bin/phpunit --coverage-clover=coverage.clover
9-
- wget https://scrutinizer-ci.com/ocular.phar
10-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
11-
- rm coverage.clover
9+
- vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-html coverage
10+
- wget https://scrutinizer-ci.com/ocular.phar
11+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
12+
after_success:
13+
- git config --global user.email "travis@travis-ci.org"
14+
- git config --global user.name "Travis"
15+
- cp -R coverage ${HOME}/coverage
16+
- cd ${HOME}
17+
- git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/typedphp/type-functions.git
18+
gh-pages > /dev/null
19+
- cd gh-pages
20+
- mkdir ${TRAVIS_BRANCH}
21+
- cd ${TRAVIS_BRANCH}
22+
- cp -Rf $HOME/coverage/* .
23+
- git add -f .
24+
- git commit -m "Travis pushed coverage of ${TRAVIS_COMMIT}@${TRAVIS_BRANCH} to gh-pages"
25+
- git push -fq origin gh-pages > /dev/null
26+
branches:
27+
only:
28+
- master
29+
- dev
30+
env:
31+
global:
32+
secure: FM0bkm7MbRReUDKu9ylY84VzJPhhjL9IVPBxTrv2+Q9winnUcAN/wobM0h5uM0l+FEYirqe159cvFLVFZkDUvvJC6KrlMCXzWO1i639mSlJPZUS20sRjvWotjXgyaf8RppuYprjIoK8fB60QLfItCvwEvzWN6xoUH+o/6e55sA4=

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"autoload": {
1515
"files": [
16-
"source/TypeFunctions.php"
16+
"src/TypeFunctions.php"
1717
]
1818
},
1919
"require-dev": {
@@ -22,10 +22,10 @@
2222
},
2323
"autoload-dev": {
2424
"files": [
25-
"tests/TestCase.php"
25+
"tests/Test.php"
2626
],
2727
"psr-4": {
28-
"TypedPHP\\Functions\\TypeFunctions\\Tests\\": "tests"
28+
"TypedPHP\\Functions\\TypeFunctions\\Test\\": "tests"
2929
}
3030
}
3131
}
File renamed without changes.

tests/Test.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace TypedPHP\Functions\TypeFunctions\Test;
4+
5+
use PHPUnit_Framework_TestCase;
6+
7+
class Test extends PHPUnit_Framework_TestCase
8+
{
9+
10+
}

tests/TestCase.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/TypeFunctionTest.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?php
22

3-
namespace TypedPHP\Functions\TypeFunctions\Tests;
3+
namespace TypedPHP\Functions\TypeFunctions\Test;
44

55
use TypedPHP\Functions\TypeFunctions;
66

7-
class TypeFunctionTest extends TestCase
7+
class TypeFunctionTest extends Test
88
{
99
/**
1010
* @test
11-
*
12-
* @return void
1311
*/
1412
public function testIsNumber()
1513
{
@@ -24,8 +22,6 @@ public function testIsNumber()
2422

2523
/**
2624
* @test
27-
*
28-
* @return void
2925
*/
3026
public function testIsBoolean()
3127
{
@@ -40,8 +36,6 @@ public function testIsBoolean()
4036

4137
/**
4238
* @test
43-
*
44-
* @return void
4539
*/
4640
public function testIsNull()
4741
{
@@ -54,8 +48,6 @@ public function testIsNull()
5448

5549
/**
5650
* @test
57-
*
58-
* @return void
5951
*/
6052
public function testIsObject()
6153
{
@@ -70,8 +62,6 @@ public function testIsObject()
7062

7163
/**
7264
* @test
73-
*
74-
* @return void
7565
*/
7666
public function testIsFunction()
7767
{
@@ -87,8 +77,6 @@ public function testIsFunction()
8777

8878
/**
8979
* @test
90-
*
91-
* @return void
9280
*/
9381
public function testIsExpression()
9482
{
@@ -99,8 +87,6 @@ public function testIsExpression()
9987

10088
/**
10189
* @test
102-
*
103-
* @return void
10490
*/
10591
public function testIsString()
10692
{
@@ -111,8 +97,6 @@ public function testIsString()
11197

11298
/**
11399
* @test
114-
*
115-
* @return void
116100
*/
117101
public function testIsResource()
118102
{
@@ -127,8 +111,6 @@ public function testIsResource()
127111

128112
/**
129113
* @test
130-
*
131-
* @return void
132114
*/
133115
public function testGetType()
134116
{

0 commit comments

Comments
 (0)