mirror of
https://github.com/php/pie.git
synced 2026-03-23 23:12:17 +01:00
30 lines
860 B
PHP
30 lines
860 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Php\PieUnitTest\SelfManage\BuildTools;
|
|
|
|
use Php\Pie\SelfManage\BuildTools\PackageManager;
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
#[CoversClass(PackageManager::class)]
|
|
final class PackageManagerTest extends TestCase
|
|
{
|
|
public function testInstallCommand(): void
|
|
{
|
|
self::assertSame(
|
|
['echo', '"fake installing a, b"'],
|
|
PackageManager::Test->installCommand(['a', 'b']),
|
|
);
|
|
self::assertSame(
|
|
['apt-get', 'install', '-y', '--no-install-recommends', '--no-install-suggests', 'a', 'b'],
|
|
PackageManager::Apt->installCommand(['a', 'b']),
|
|
);
|
|
self::assertSame(
|
|
['apk', 'add', '--no-cache', 'a', 'b'],
|
|
PackageManager::Apk->installCommand(['a', 'b']),
|
|
);
|
|
}
|
|
}
|