|
20 | 20 | use Php\Pie\DependencyResolver\RequestedPackageAndVersion; |
21 | 21 | use Php\Pie\DependencyResolver\ResolvedPackageRequest; |
22 | 22 | use Php\Pie\Platform; |
| 23 | +use Php\Pie\Platform\OperatingSystem; |
23 | 24 | use Php\Pie\Platform\TargetPhp\PhpBinaryPath; |
24 | 25 | use Php\Pie\Platform\TargetPlatform; |
25 | 26 | use Php\PieIntegrationTest\Command\IsolatedWorkingDirectoryTestCase; |
26 | 27 | use PHPUnit\Framework\Attributes\CoversClass; |
| 28 | +use PHPUnit\Framework\Attributes\RequiresOperatingSystemFamily; |
27 | 29 | use Symfony\Component\Console\Output\BufferedOutput; |
28 | 30 |
|
29 | 31 | use function file_exists; |
@@ -117,6 +119,7 @@ public function testRunInstallSkipsAlreadyVerifiedPackageAtSameVersion(): void |
117 | 119 | self::assertStringContainsString('Nothing to install, update or remove', $output); |
118 | 120 | } |
119 | 121 |
|
| 122 | + #[RequiresOperatingSystemFamily('Linux')] |
120 | 123 | public function testRunInstallReinstallsVerifiedPackageWhenVersionDiffers(): void |
121 | 124 | { |
122 | 125 | PieJsonEditor::fromTargetPlatform($this->targetPlatform) |
@@ -169,7 +172,9 @@ public function testRunUninstallRemovesPackageFromPieJson(): void |
169 | 172 |
|
170 | 173 | private function extensionBinaryPath(): string |
171 | 174 | { |
172 | | - return $this->targetPlatform->phpBinaryPath->extensionPath() . DIRECTORY_SEPARATOR . self::EXTENSION_NAME . '.so'; |
| 175 | + $isWindows = $this->targetPlatform->operatingSystem === OperatingSystem::Windows; |
| 176 | + |
| 177 | + return $this->targetPlatform->phpBinaryPath->extensionPath() . DIRECTORY_SEPARATOR . ($isWindows ? 'php_' : '') . self::EXTENSION_NAME . ($isWindows ? '.dll' : '.so'); |
173 | 178 | } |
174 | 179 |
|
175 | 180 | /** @param non-empty-string $version */ |
|
0 commit comments