@@ -85,19 +85,6 @@ public function testGetTargetOS(string $target, string $expected): void
85
85
$ this ->assertEquals ($ expected , $ result );
86
86
}
87
87
88
- /**
89
- * @dataProvider invalidTargetProvider
90
- */
91
- public function testGetTargetOSWithInvalidTarget (string $ target ): void
92
- {
93
- putenv ("SPC_TARGET= {$ target }" );
94
-
95
- $ this ->expectException (WrongUsageException::class);
96
- $ this ->expectExceptionMessage ('Cannot parse target. ' );
97
-
98
- SPCTarget::getTargetOS ();
99
- }
100
-
101
88
public function testLibcListConstant (): void
102
89
{
103
90
$ this ->assertIsArray (SPCTarget::LIBC_LIST );
@@ -117,22 +104,13 @@ public function libcProvider(): array
117
104
public function targetOSProvider (): array
118
105
{
119
106
return [
120
- 'linux-target ' => ['linux-x86_64 ' , 'Linux ' ],
121
- 'macos-target ' => ['macos-x86_64 ' , 'Darwin ' ],
122
- 'windows-target ' => ['windows-x86_64 ' , 'Windows ' ],
107
+ 'linux-target ' => ['native-linux ' , 'Linux ' ],
108
+ 'macos-target ' => ['native-macos ' , 'Darwin ' ],
109
+ 'windows-target ' => ['native-windows ' , 'Windows ' ],
123
110
'empty-target ' => ['' , PHP_OS_FAMILY ],
124
111
];
125
112
}
126
113
127
- public function invalidTargetProvider (): array
128
- {
129
- return [
130
- 'invalid-target ' => ['invalid-target ' ],
131
- 'unknown-target ' => ['unknown-target ' ],
132
- 'mixed-target ' => ['mixed-target ' ],
133
- ];
134
- }
135
-
136
114
private function assertIsStringOrNull ($ value ): void
137
115
{
138
116
$ this ->assertTrue (is_string ($ value ) || is_null ($ value ), 'Value must be string or null ' );
0 commit comments