Skip to content

Commit 40b679b

Browse files
authored
Merge pull request #548 from PrestaShop/dependabot/composer/develop/symfony/maker-bundle-1.66.0
build(deps-dev): bump symfony/maker-bundle from 1.65.1 to 1.66.0
2 parents e9f1e69 + 82efe1e commit 40b679b

File tree

3 files changed

+31
-16
lines changed

3 files changed

+31
-16
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ jobs:
8282
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8383

8484
- name: Setup MySQL
85-
uses: mirromutth/mysql-action@v1.1
85+
uses: shogo82148/actions-setup-mysql@v1
8686
with:
87-
mysql version: '8.0'
88-
mysql database: 'qanightlyresults'
89-
mysql root password: 'root'
87+
mysql-version: '8.0'
88+
root-password: 'root'
89+
90+
- name: Create database
91+
run: mysql -h127.0.0.1 -uroot -proot -e "create schema qanightlyresults;"
9092

9193
- uses: actions/checkout@v3
9294

@@ -96,9 +98,6 @@ jobs:
9698
- name: Composer Install
9799
run: composer install --ansi --prefer-dist --no-interaction --no-progress
98100

99-
- name: Change MySQL authentication method
100-
run: sleep 15 && mysql -h127.0.0.1 -uroot -proot -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root'; FLUSH PRIVILEGES;"
101-
102101
- name: Setup database
103102
run: php bin/console doctrine:schema:update --dump-sql --force --env=test
104103

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Controller/ReportControllerTest.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static function setUpBeforeClass(): void
1717
{
1818
$numPage = 1;
1919
do {
20-
$data = file_get_contents('https://api-nightly.prestashop-project.org/reports?filter_version=develop&filter_campaign=functional&limit=100&page=' . $numPage);
20+
$data = self::getContents('https://api-nightly.prestashop-project.org/reports?filter_version=develop&filter_campaign=functional&limit=100&page=' . $numPage);
2121
$data = json_decode($data, true);
2222
foreach ($data['reports'] as $datum) {
2323
if ($datum['date'] === self::DATE_RESOURCE) {
@@ -28,11 +28,27 @@ public static function setUpBeforeClass(): void
2828
++$numPage;
2929
} while (self::$reportId == 0);
3030

31-
$data = file_get_contents('https://api-nightly.prestashop-project.org/reports/' . self::$reportId);
31+
$data = self::getContents('https://api-nightly.prestashop-project.org/reports/' . self::$reportId);
3232
$data = json_decode($data, true);
3333
self::$suiteId = min(array_keys($data['suites_data']));
3434
}
3535

36+
private static function getContents(string $url): string
37+
{
38+
$hCurl = curl_init();
39+
40+
curl_setopt($hCurl, CURLOPT_URL, $url);
41+
curl_setopt($hCurl, CURLOPT_RETURNTRANSFER, true);
42+
curl_setopt($hCurl, CURLOPT_TIMEOUT, 120);
43+
curl_setopt($hCurl, CURLOPT_CONNECTTIMEOUT, 120);
44+
45+
$result = curl_exec($hCurl);
46+
47+
curl_close($hCurl);
48+
49+
return $result;
50+
}
51+
3652
public function testCorsReports(): void
3753
{
3854
$client = static::createClient();

0 commit comments

Comments
 (0)