Skip to content

Commit 919c01a

Browse files
Test fixes
1 parent e1d57f6 commit 919c01a

File tree

8 files changed

+57
-76
lines changed

8 files changed

+57
-76
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
/.gitattributes export-ignore
77
/.gitignore export-ignore
88
/.github export-ignore
9-
/.travis.yml export-ignore
109
/phpunit.xml.dist export-ignore
1110
/README.md export-ignore

.github/bin/composer.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
EXPECTED_CHECKSUM="$(wget -q -O - https://composer.github.io/installer.sig)"
4+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
5+
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
6+
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
7+
>&2 echo 'ERROR: Invalid installer checksum'
8+
rm composer-setup.php
9+
exit 1
10+
else
11+
php composer-setup.php --install-dir="/usr/bin" --filename=composer
12+
RESULT=$?
13+
rm composer-setup.php
14+
composer config platform.php 5.6.50
15+
exit $RESULT
16+
fi

.github/bin/hhvm.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
echo "deb https://dl.hhvm.com/ubuntu $(lsb_release -sc)-lts-$1 main" >> /etc/apt/sources.list
4+
apt-get update
5+
apt-get --allow-downgrades --reinstall install hhvm/$(lsb_release -sc)-lts-$1

.github/workflows/tests.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
pull_request:
66

77
jobs:
8-
tests:
8+
php:
99
name: PHP ${{ matrix.php }}
1010
runs-on: ubuntu-20.04
1111

1212
strategy:
1313
matrix:
14-
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
14+
php: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
1515

1616
steps:
1717
- name: Checkout Code
@@ -40,8 +40,38 @@ jobs:
4040
with:
4141
timeout_minutes: 5
4242
max_attempts: 5
43-
command: composer update --no-interaction --no-progress --ignore-platform-reqs
43+
command: composer update --no-interaction --no-progress --ignore-platform-req=php
4444
if: "matrix.php >= 8"
4545

4646
- name: Execute PHPUnit
4747
run: vendor/bin/phpunit
48+
49+
hhvm:
50+
name: HHVM ${{ matrix.hhvm }}
51+
runs-on: ubuntu-16.04
52+
53+
strategy:
54+
matrix:
55+
hhvm: ["3.15", "3.18", "3.21", "3.24", "3.27", "3.30"]
56+
57+
steps:
58+
- name: Checkout Code
59+
uses: actions/checkout@v2
60+
61+
- name: Install HHVM
62+
shell: bash
63+
run: sudo .github/bin/hhvm.sh ${{ matrix.hhvm }}
64+
65+
- name: Install Composer
66+
shell: bash
67+
run: sudo .github/bin/composer.sh
68+
69+
- name: Install Dependencies
70+
uses: nick-invision/retry@v1
71+
with:
72+
timeout_minutes: 5
73+
max_attempts: 5
74+
command: composer update --no-interaction --no-progress
75+
76+
- name: Execute PHPUnit
77+
run: hhvm vendor/bin/phpunit

.travis.yml

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"require-dev": {
2323
"ext-filter": "*",
2424
"ext-pcre": "*",
25-
"phpunit/phpunit": "^4.8.35 || ^5.7.27"
25+
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20"
2626
},
2727
"autoload": {
2828
"psr-4": {

tests/Dotenv/DotenvTest.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ public function testDotenvLoadsServerGlobals()
121121
$this->assertEmpty($_ENV['NULL']);
122122
}
123123

124-
/**
125-
* @depends testDotenvLoadsEnvironmentVars
126-
* @depends testDotenvLoadsEnvGlobals
127-
* @depends testDotenvLoadsServerGlobals
128-
*/
129124
public function testDotenvRequiredStringEnvironmentVars()
130125
{
131126
$dotenv = new Dotenv($this->fixturesFolder);
@@ -134,11 +129,6 @@ public function testDotenvRequiredStringEnvironmentVars()
134129
$this->assertTrue(true); // anything wrong an exception will be thrown
135130
}
136131

137-
/**
138-
* @depends testDotenvLoadsEnvironmentVars
139-
* @depends testDotenvLoadsEnvGlobals
140-
* @depends testDotenvLoadsServerGlobals
141-
*/
142132
public function testDotenvRequiredArrayEnvironmentVars()
143133
{
144134
$dotenv = new Dotenv($this->fixturesFolder);
@@ -158,11 +148,6 @@ public function testDotenvNestedEnvironmentVars()
158148
$this->assertSame('Special Value', $_ENV['NVAR7']); // nested '.' (dot) variable
159149
}
160150

161-
/**
162-
* @depends testDotenvLoadsEnvironmentVars
163-
* @depends testDotenvLoadsEnvGlobals
164-
* @depends testDotenvLoadsServerGlobals
165-
*/
166151
public function testDotenvAllowedValues()
167152
{
168153
$dotenv = new Dotenv($this->fixturesFolder);
@@ -172,10 +157,6 @@ public function testDotenvAllowedValues()
172157
}
173158

174159
/**
175-
* @depends testDotenvLoadsEnvironmentVars
176-
* @depends testDotenvLoadsEnvGlobals
177-
* @depends testDotenvLoadsServerGlobals
178-
*
179160
* @expectedException \Dotenv\Exception\ValidationException
180161
* @expectedExceptionMessage One or more environment variables failed assertions: FOO is not an allowed value.
181162
*/

tests/Dotenv/ValidatorBooleanTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

33
use Dotenv\Dotenv;
4+
use PHPUnit\Framework\TestCase;
45

5-
class ValidatorBooleanTest extends PHPUnit_Framework_TestCase
6+
class ValidatorBooleanTest extends TestCase
67
{
78
/**
89
* @var string

0 commit comments

Comments
 (0)