Skip to content

Commit 210f02c

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2 parents ef0dfce + 80209ca commit 210f02c

5 files changed

Lines changed: 1125 additions & 1072 deletions

File tree

.github/workflows/test-selenium.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,8 @@ jobs:
8484
- name: Checkout code
8585
uses: actions/checkout@v4
8686

87-
- name: Refresh apt cache
88-
run: sudo apt-get update
89-
9087
- name: Install gettext
91-
run: sudo apt-get install -y gettext
88+
run: sudo apt-get update && sudo apt-get install -y gettext
9289

9390
- name: Generate mo files
9491
run: ./bin/generate-mo --quiet
@@ -156,4 +153,4 @@ jobs:
156153
with:
157154
name: selenium-screenshots
158155
path: ${{ github.workspace }}/build/selenium/**/*
159-
retention-days: 1
156+
retention-days: 3

phpstan-baseline.neon

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,126 @@ parameters:
7878
count: 1
7979
path: app/services_loader.php
8080

81+
-
82+
message: '#^Access to constant FORMAT_HTTP on an unknown class OpenID_Message\.$#'
83+
identifier: class.notFound
84+
count: 1
85+
path: examples/openid.php
86+
87+
-
88+
message: '#^Binary operation "\." between ''\://'' and mixed results in an error\.$#'
89+
identifier: binaryOp.invalid
90+
count: 1
91+
path: examples/openid.php
92+
93+
-
94+
message: '#^Binary operation "\." between ''\<p class\="error"\>'' and mixed results in an error\.$#'
95+
identifier: binaryOp.invalid
96+
count: 1
97+
path: examples/openid.php
98+
99+
-
100+
message: '#^Binary operation "\." between ''Location\: '' and mixed results in an error\.$#'
101+
identifier: binaryOp.invalid
102+
count: 1
103+
path: examples/openid.php
104+
105+
-
106+
message: '#^Binary operation "\." between non\-falsy\-string and mixed results in an error\.$#'
107+
identifier: binaryOp.invalid
108+
count: 1
109+
path: examples/openid.php
110+
111+
-
112+
message: '#^Cannot call method get\(\) on mixed\.$#'
113+
identifier: method.nonObject
114+
count: 1
115+
path: examples/openid.php
116+
117+
-
118+
message: '#^Cannot call method getAuthorizeURL\(\) on mixed\.$#'
119+
identifier: method.nonObject
120+
count: 1
121+
path: examples/openid.php
122+
123+
-
124+
message: '#^Cannot call method prepare\(\) on mixed\.$#'
125+
identifier: method.nonObject
126+
count: 1
127+
path: examples/openid.php
128+
129+
-
130+
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
131+
identifier: empty.notAllowed
132+
count: 1
133+
path: examples/openid.php
134+
135+
-
136+
message: '#^Instantiated class OpenID_Message not found\.$#'
137+
identifier: class.notFound
138+
count: 1
139+
path: examples/openid.php
140+
141+
-
142+
message: '#^Instantiated class OpenID_RelyingParty not found\.$#'
143+
identifier: class.notFound
144+
count: 1
145+
path: examples/openid.php
146+
147+
-
148+
message: '#^Only booleans are allowed in a negated boolean, int\<0, max\> given\.$#'
149+
identifier: booleanNot.exprNotBoolean
150+
count: 3
151+
path: examples/openid.php
152+
153+
-
154+
message: '#^Parameter \#1 \$e of function Die_error expects Exception, Throwable given\.$#'
155+
identifier: argument.type
156+
count: 3
157+
path: examples/openid.php
158+
159+
-
160+
message: '#^Parameter \#1 \$path of function dirname expects string, mixed given\.$#'
161+
identifier: argument.type
162+
count: 1
163+
path: examples/openid.php
164+
165+
-
166+
message: '#^Parameter \#2 \$string of function explode expects string, mixed given\.$#'
167+
identifier: argument.type
168+
count: 1
169+
path: examples/openid.php
170+
171+
-
172+
message: '#^Path in include_once\(\) "OpenID/RelyingParty\.php" is not a file or it does not exist\.$#'
173+
identifier: includeOnce.fileNotFound
174+
count: 1
175+
path: examples/openid.php
176+
177+
-
178+
message: '#^Variable \$authRequest might not be defined\.$#'
179+
identifier: variable.undefined
180+
count: 1
181+
path: examples/openid.php
182+
183+
-
184+
message: '#^Variable \$message might not be defined\.$#'
185+
identifier: variable.undefined
186+
count: 1
187+
path: examples/openid.php
188+
189+
-
190+
message: '#^Variable \$o might not be defined\.$#'
191+
identifier: variable.undefined
192+
count: 1
193+
path: examples/openid.php
194+
195+
-
196+
message: '#^Parameter \#1 \(mixed\) of echo cannot be converted to string\.$#'
197+
identifier: echo.nonString
198+
count: 1
199+
path: examples/signon.php
200+
81201
-
82202
message: '#^Binary operation "\." between ''\<p\>File \<samp\>'' and mixed results in an error\.$#'
83203
identifier: binaryOp.invalid

phpstan.neon.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ parameters:
44
level: max
55
paths:
66
- app
7+
- examples
78
- public
89
- src
910
- tests
1011
scanFiles:
1112
- app/constants.php
12-
- examples/signon-script.php
1313
bootstrapFiles:
1414
- tests/phpstan-constants.php
1515
stubFiles:
1616
- tests/stubs/uploadprogress.stub
1717
excludePaths:
1818
- app/cache/*
19+
- examples/config.manyhosts.inc.php
1920
- tests/doctum-config.php
2021
dynamicConstantNames:
2122
- ROOT_PATH

tests/end-to-end/TestBase.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Facebook\WebDriver\WebDriverExpectedCondition;
1919
use Facebook\WebDriver\WebDriverSelect;
2020
use InvalidArgumentException;
21+
use PHPUnit\Framework\SkippedTest;
2122
use PHPUnit\Framework\TestCase;
2223
use Throwable;
2324

@@ -651,7 +652,7 @@ public function dbQuery(string $query, Closure|null $onResults = null, Closure|n
651652
$this->waitAjax();
652653
$this->waitForElement('className', 'result_query');
653654
// If present then
654-
$didSucceed = $this->isElementPresent('xpath', '//*[@class="result_query"]//*[contains(., "success")]');
655+
$didSucceed = $this->isElementPresent('cssSelector', '.result_query .alert-success');
655656
$onResults?->call($this);
656657
}
657658

@@ -1180,6 +1181,10 @@ private function getErrorVideoUrl(): void
11801181
*/
11811182
protected function onNotSuccessfulTest(Throwable $t): never
11821183
{
1184+
if ($t instanceof SkippedTest) {
1185+
parent::onNotSuccessfulTest($t);
1186+
}
1187+
11831188
$this->markTestAs('failed', $t->getMessage());
11841189
$this->takeScrenshot('test_failed');
11851190
// End testing session

0 commit comments

Comments
 (0)