Skip to content

Commit ebf0437

Browse files
committed
f
1 parent f1d7bbf commit ebf0437

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

tests/binary/BinTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?php
22
namespace Test\Binary;
33

4+
use PHPUnit\Framework\Attributes\Group;
45
use Polyfill\TestCaseCompatible;
56

67
/**
78
* @group binary
89
*/
10+
#[Group('binary')]
911
class BinTest extends \PHPUnit\Framework\TestCase
1012
{
1113
use TestCaseCompatible;

tests/binary/PharTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?php
22
namespace Test\Binary;
33

4+
use PHPUnit\Framework\Attributes\Group;
45
use Polyfill\TestCaseCompatible;
56

67
/**
78
* @group binary
89
*/
10+
#[Group('binary')]
911
class PharTest extends \PHPUnit\Framework\TestCase
1012
{
1113

tests/binary/ReportTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?php
22
namespace Test\Binary;
33

4+
use PHPUnit\Framework\Attributes\Group;
45
use Polyfill\TestCaseCompatible;
56

67
/**
78
* @group binary
89
*/
10+
#[Group('binary')]
911
class BinReportTest extends \PHPUnit\Framework\TestCase
1012
{
1113
use TestCaseCompatible;

tests/binary/StandaloneTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
<?php
22
namespace Test\Hal\binary;
33

4+
use PHPUnit\Framework\Attributes\Group;
45
use Polyfill\TestCaseCompatible;
56

67
/**
78
* @group binary
89
*/
10+
#[Group('binary')]
911
class StandaloneTest extends \PHPUnit\Framework\TestCase
1012
{
1113

1214
use TestCaseCompatible;
1315

14-
private $phar;
16+
private $binary;
1517

1618
public function setUp(): void
1719
{
1820
parent::setUp();
19-
$this->phar = __DIR__ . '/../../releases/phpmetrics-linux-x86_64';
21+
$this->binary = __DIR__ . '/../../releases/phpmetrics-linux-x86_64';
2022
}
2123

22-
public function testICanRunPhar(): void
24+
public function testICanRunStandaloneBinary(): void
2325
{
24-
$command = sprintf('%s --version', $this->phar);
26+
$command = sprintf('%s --version', $this->binary);
2527
$r = shell_exec($command);
2628
$this->assertStringContainsString('PhpMetrics', $r);
2729
}
2830

2931
public function testICanProvideOneDirectoryToParse(): void
3032
{
31-
$command = sprintf('%s --exclude="" %s 2>&1', $this->phar, __DIR__ . '/examples/1');
33+
$command = sprintf('%s --exclude="" %s 2>&1', $this->binary, __DIR__ . '/examples/1');
3234
$r = shell_exec($command);
3335
$this->assertStringContainsString('Object oriented programming', $r);
3436
$this->assertStringContainsString('LOC', $r);
@@ -39,7 +41,7 @@ public function testICanProvideMultipleDirectoriesToParse(): void
3941
{
4042
$command = sprintf(
4143
'%s --exclude="" %s,%s 2>&1',
42-
$this->phar,
44+
$this->binary,
4345
__DIR__ . '/examples/1',
4446
__DIR__ . '/examples/2'
4547
);

0 commit comments

Comments
 (0)