Skip to content

Commit c2174c6

Browse files
committed
Updated dependencies (php>=7.3)
1 parent 4ea5236 commit c2174c6

File tree

5 files changed

+40
-21
lines changed

5 files changed

+40
-21
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/.idea/
22
/bin/
33
/composer.lock
4+
/custom.task.properties
5+
/custom.type.properties
46
/test/coverage.xml
57
/test/report/
6-
/vendor/
8+
/vendor/

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
language: php
22
php:
3-
- '7.1'
4-
- '7.2'
53
- '7.3'
6-
4+
- '7.4'
5+
76
install:
87
- composer self-update
98
- composer update
10-
11-
script:
9+
10+
script:
1211
- ./bin/phing unit
13-
12+
1413

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,23 @@
3131
</tr>
3232
</tbody>
3333
</table>
34+
35+
Manual
36+
======
37+
38+
39+
40+
Installing
41+
==========
42+
43+
Program Execution Helper can be installed using Composer:
44+
```sh
45+
composer require setbased/helper-program-execution
46+
```
47+
48+
License
49+
=======
50+
51+
This project is licensed under the terms of the MIT license.
52+
53+

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
],
88
"license": "MIT",
99
"require": {
10-
"php": ">=7.1"
10+
"php": ">=7.3"
1111
},
1212
"require-dev": {
13-
"phing/phing": "^2.0.0",
14-
"phpunit/phpunit": "^6.0.0",
15-
"setbased/phing-extensions": "^2.0.0"
13+
"phing/phing": "^2.0",
14+
"phpunit/phpunit": "^9.0",
15+
"setbased/phing-extensions": "^2.0"
1616
},
1717
"autoload": {
1818
"psr-4": {
@@ -25,6 +25,7 @@
2525
}
2626
},
2727
"config": {
28-
"bin-dir": "bin/"
28+
"bin-dir": "bin/",
29+
"sort-packages": true
2930
}
3031
}

test/Helper/ProgramExecutionTest.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace SetBased\Helper\Test;
55

66
use PHPUnit\Framework\TestCase;
7+
use SetBased\Exception\ProgramExecutionException;
78
use SetBased\Helper\ProgramExecution;
89

910
/**
@@ -25,12 +26,10 @@ public function testExec1AnyExitStatus1(): void
2526
//--------------------------------------------------------------------------------------------------------------------
2627
/**
2728
* Test with failed command and empty allowed exit statuses.
28-
*
29-
* @expectedException \SetBased\Exception\ProgramExecutionException
3029
*/
3130
public function testExec1AnyExitStatus2(): void
3231
{
33-
$ret = ProgramExecution::exec1(['false'], []);
32+
$ret = ProgramExecution::exec1(['false'], null);
3433

3534
$this->assertSame(1, $ret[1]);
3635
}
@@ -41,7 +40,7 @@ public function testExec1AnyExitStatus2(): void
4140
*/
4241
public function testExec1BasicUsage(): void
4342
{
44-
list($output, $status) = ProgramExecution::exec1(['echo', 'hello, world!']);
43+
[$output, $status] = ProgramExecution::exec1(['echo', 'hello, world!']);
4544

4645
$this->assertSame(0, $status);
4746
$this->assertSame($output, ['hello, world!']);
@@ -50,11 +49,10 @@ public function testExec1BasicUsage(): void
5049
//--------------------------------------------------------------------------------------------------------------------
5150
/**
5251
* Test with failed command.
53-
*
54-
* @expectedException \SetBased\Exception\ProgramExecutionException
5552
*/
5653
public function testExec1ExitStatusFail(): void
5754
{
55+
$this->expectException(ProgramExecutionException::class);
5856
ProgramExecution::exec1(['cmp', __FILE__, 'foogazy'], [0, 1]);
5957
}
6058

@@ -92,7 +90,7 @@ public function testExec1TrickyCommand(): void
9290

9391
foreach ($strings as $string)
9492
{
95-
list($output, $status) = ProgramExecution::exec1(['echo', $string]);
93+
[$output, $status] = ProgramExecution::exec1(['echo', $string]);
9694

9795
$this->assertSame(0, $status);
9896
$this->assertSame($string, $output[0]);
@@ -130,11 +128,10 @@ public function testExec2BasicUsage(): void
130128
//--------------------------------------------------------------------------------------------------------------------
131129
/**
132130
* Test with failed command.
133-
*
134-
* @expectedException \SetBased\Exception\ProgramExecutionException
135131
*/
136132
public function testExec2ExitStatusFail(): void
137133
{
134+
$this->expectException(ProgramExecutionException::class);
138135
ProgramExecution::exec2(['cmp', __FILE__, 'foogazy'], null, '/dev/null');
139136
}
140137

0 commit comments

Comments
 (0)