Now actually running tests, dropping PHP5.5

This commit is contained in:
Ismo Vuorinen
2017-09-14 12:15:19 +03:00
parent 6998e75451
commit b9c5530928
5 changed files with 9 additions and 10 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
composer.lock composer.lock
!composer.json !composer.json
vendor vendor
build

View File

@@ -1,13 +1,11 @@
language: php language: php
php: php:
- 5.5
- 5.6 - 5.6
- 7.0 - 7.0
- 7.1 - 7.1
- nightly - nightly
matrix: matrix:
allow_failures: allow_failures:
- php: 5.5
- php: 5.6 - php: 5.6
- php: nightly - php: nightly
fast_finish: true fast_finish: true

View File

@@ -20,9 +20,9 @@
"classmap": ["src/"] "classmap": ["src/"]
}, },
"require": { "require": {
"php": ">=5.2.0" "php": ">=5.6.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^5.7" "phpunit/phpunit": "^5.7 || ^6.3"
} }
} }

View File

@@ -13,7 +13,7 @@
> >
<testsuites> <testsuites>
<testsuite name="Test Suite"> <testsuite name="Test Suite">
<directory>./tests/</directory> <directory suffix="Test.php" phpVersion="5.6.0" phpVersionOperator=">=">./tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
@@ -22,4 +22,4 @@
<directory>./src/</directory> <directory>./src/</directory>
</whitelist> </whitelist>
</filter> </filter>
</phpunit> </phpunit>

View File

@@ -1,6 +1,6 @@
<?php <?php
class PaletteTests extends \PHPUnit_Framework_TestCase class PaletteTest extends \PHPUnit_Framework_TestCase
{ {
public function test_class_is_found_and_has_default_attributes() public function test_class_is_found_and_has_default_attributes()
{ {
@@ -16,7 +16,7 @@ class PaletteTests extends \PHPUnit_Framework_TestCase
public function test_known_images() public function test_known_images()
{ {
$location = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR; $location = __DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;
$images = ['black.png' => '000000', 'red.png' => 'CC3333']; $images = ['black.png' => '000000', 'red.png' => 'CC3333'];
foreach ($images as $imageFile => $hex) { foreach ($images as $imageFile => $hex) {
@@ -29,4 +29,4 @@ class PaletteTests extends \PHPUnit_Framework_TestCase
$this->assertEquals($image, $palette->filename); $this->assertEquals($image, $palette->filename);
} }
} }
} }