Skip to content

Commit 04a791f

Browse files
committed
436: check for prebuilt archive output in Behat test
1 parent e254033 commit 04a791f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/behaviour/CliContext.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use function copy;
1818
use function realpath;
1919
use function sprintf;
20+
use function str_contains;
2021

2122
class CliContext implements Context
2223
{
@@ -119,6 +120,13 @@ public function theExtensionShouldHaveBeenBuilt(): void
119120
return;
120121
}
121122

123+
if (str_contains($this->output, 'Found prebuilt archive')) {
124+
Assert::contains($this->output, 'Found prebuilt archive');
125+
Assert::contains($this->output, 'Pre-packaged binary found');
126+
127+
return;
128+
}
129+
122130
Assert::contains($this->output, 'phpize complete.');
123131
Assert::contains($this->output, 'Configure complete');
124132
Assert::contains($this->output, 'Build complete:');
@@ -141,6 +149,13 @@ public function theExtensionShouldHaveBeenBuiltWithOptions(): void
141149
return;
142150
}
143151

152+
if (str_contains($this->output, 'Found prebuilt archive')) {
153+
Assert::contains($this->output, 'Found prebuilt archive');
154+
Assert::contains($this->output, 'Pre-packaged binary found');
155+
156+
return;
157+
}
158+
144159
Assert::contains($this->output, 'phpize complete.');
145160
Assert::contains($this->output, 'Configure complete with options: --with-hello-name=sup');
146161
Assert::contains($this->output, 'Build complete:');

0 commit comments

Comments
 (0)