Skip to content

Commit

Permalink
Test enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Mar 1, 2020
1 parent 323f5fe commit a41cec5
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 77 deletions.
35 changes: 25 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

before_script:
- composer self-update && composer install --dev --prefer-source --no-interaction
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install --prefer-dist --no-interaction

matrix:
fast_finish: true
fast_finish: true
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
- php: 5.6
dist: xenial
- php: 7.0
dist: xenial
- php: 7.1
dist: xenial
- php: 7.2
dist: xenial
- php: 7.3
dist: xenial
- php: 7.4
dist: xenial

script:
- vendor/bin/phpunit
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"error"
],
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"phpunit/phpunit": "4.0.*"
"phpunit/phpunit": "^4.8.36"
},
"require": {
"php": ">=5.3.0"
Expand All @@ -39,5 +40,10 @@
"psr-4": {
"dstuecken\\Php7ify\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"php7ifytest\\": "tests/php7ify/"
}
}
}
}
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
</phpunit>
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

$loader = require __DIR__.'/../vendor/autoload.php';
$loader->add('php7ifytest\\', array($baseDir.'/tests/php7ify/'));
$loader->register();
$loader->register();
13 changes: 4 additions & 9 deletions tests/php7ify/ArithmeticErrorTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?php
namespace php7ifytest;

Class ArithmeticErrorTest
extends \PHPUnit_Framework_TestCase
{

public function setUp()
{

}
use PHPUnit\Framework\TestCase;

Class ArithmeticErrorTest extends TestCase
{
public function testThrowException()
{
try
Expand All @@ -21,4 +16,4 @@ public function testThrowException()
;
}
}
}
}
13 changes: 4 additions & 9 deletions tests/php7ify/AssertionErrorTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?php
namespace php7ifytest;

Class AssertionErrorTest
extends \PHPUnit_Framework_TestCase
{

public function setUp()
{

}
use PHPUnit\Framework\TestCase;

Class AssertionErrorTest extends TestCase
{
public function testThrowException()
{
try
Expand All @@ -21,4 +16,4 @@ public function testThrowException()
;
}
}
}
}
13 changes: 4 additions & 9 deletions tests/php7ify/DivisionByZeroTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?php
namespace php7ifytest;

Class DivisionByZeroTest
extends \PHPUnit_Framework_TestCase
{

public function setUp()
{

}
use PHPUnit\Framework\TestCase;

Class DivisionByZeroTest extends TestCase
{
public function testThrowException()
{
try
Expand All @@ -21,4 +16,4 @@ public function testThrowException()
;
}
}
}
}
13 changes: 4 additions & 9 deletions tests/php7ify/ErrorTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?php
namespace php7ifytest;

Class ErrorTest
extends \PHPUnit_Framework_TestCase
{

public function setUp()
{

}
use PHPUnit\Framework\TestCase;

Class ErrorTest extends TestCase
{
public function testThrowException()
{
try
Expand All @@ -21,4 +16,4 @@ public function testThrowException()
;
}
}
}
}
13 changes: 4 additions & 9 deletions tests/php7ify/ParseErrorTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?php
namespace php7ifytest;

Class ParseErrorTest
extends \PHPUnit_Framework_TestCase
{

public function setUp()
{

}
use PHPUnit\Framework\TestCase;

Class ParseErrorTest extends TestCase
{
public function testThrowException()
{
try
Expand All @@ -21,4 +16,4 @@ public function testThrowException()
;
}
}
}
}
12 changes: 3 additions & 9 deletions tests/php7ify/Php7CheckTest.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<?php
namespace php7ifytest;

use PHPUnit\Framework\TestCase;
use dstuecken\Php7ify\Php7\Compatibility;

Class Php7CheckTest
extends \PHPUnit_Framework_TestCase
Class Php7CheckTest extends TestCase
{

public function setUp()
{

}

public function testPhpVersion()
{
if (PHP_VERSION_ID >= 70000)
Expand All @@ -29,4 +23,4 @@ public function testPhpVersion()
}
}
}
}
}
13 changes: 4 additions & 9 deletions tests/php7ify/TypeErrorTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?php
namespace php7ifytest;

Class TypeErrorTest
extends \PHPUnit_Framework_TestCase
{

public function setUp()
{

}
use PHPUnit\Framework\TestCase;

Class TypeErrorTest extends TestCase
{
public function testThrowException()
{
try
Expand All @@ -21,4 +16,4 @@ public function testThrowException()
;
}
}
}
}

0 comments on commit a41cec5

Please sign in to comment.