Skip to content

Commit 9f7aae5

Browse files
authored
adjust test (#357)
1 parent e746c66 commit 9f7aae5

File tree

9 files changed

+37
-34
lines changed

9 files changed

+37
-34
lines changed

.github/workflows/codeception.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
PIMCORE_CODECEPTION_VERSION: "2.0"
1919

2020
APP_ENV: test
21-
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/dachcom_bundle_test"
21+
PIMCORE_TEST_DB_DSN: "mysql://test:test@127.0.0.1:3306/dachcom_bundle_test"
2222
PIMCORE_TEST_URL: "http://localhost"
2323
PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/lib/test-bundle/tests/_output/var/classes/DataObject"
2424

@@ -40,16 +40,8 @@ jobs:
4040
matrix:
4141
php: [ 8.0 ]
4242
symfony: [ ^5.4 ]
43-
pimcore: [ ~10.1.0, ~10.2.0, ~10.3.0, ~10.4.0, ~10.5.0 ]
43+
pimcore: [ ~10.5.0 ]
4444
include:
45-
- pimcore: ~10.1.0
46-
template_tag: v10.1.0
47-
- pimcore: ~10.2.0
48-
template_tag: v10.1.4
49-
- pimcore: ~10.3.0
50-
template_tag: v10.1.9
51-
- pimcore: ~10.4.0
52-
template_tag: v10.1.13
5345
- pimcore: ~10.5.0
5446
template_tag: v10.2.0
5547
steps:
@@ -90,9 +82,19 @@ jobs:
9082
run: php -v
9183

9284
- name: Setup MySql
93-
run: |
94-
sudo systemctl start mysql
95-
mysql -uroot -proot -h127.0.0.1 -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;"
85+
uses: shogo82148/actions-setup-mysql@v1
86+
with:
87+
mysql-version: '8.0'
88+
user: test
89+
password: test
90+
root-password: root
91+
auto-start: true
92+
my-cnf: |
93+
max_allowed_packet=32505856
94+
max_connections=1000
95+
96+
- name: Initial Database
97+
run: mysql -utest -ptest -h127.0.0.1 -e 'CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;'
9698

9799
- name: Setup Chromium
98100
run: |

.github/workflows/php-stan.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,8 @@ jobs:
3939
matrix:
4040
php: [ 8.0 ]
4141
symfony: [ ^5.4 ]
42-
pimcore: [ ~10.1.0, ~10.2.0, ~10.3.0, ~10.4.0, ~10.5.0 ]
42+
pimcore: [ ~10.5.0 ]
4343
include:
44-
- pimcore: ~10.1.0
45-
template_tag: v10.1.0
46-
- pimcore: ~10.2.0
47-
template_tag: v10.1.4
48-
- pimcore: ~10.3.0
49-
template_tag: v10.1.9
50-
- pimcore: ~10.4.0
51-
template_tag: v10.1.13
5244
- pimcore: ~10.5.0
5345
template_tag: v10.2.0
5446
steps:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"codeception/codeception": "^4.1",
3939
"codeception/module-webdriver": "^1.4",
4040
"codeception/module-symfony": "^1.6",
41-
"phpstan/phpstan": "^0.12",
42-
"phpstan/phpstan-symfony": "^0.12",
41+
"phpstan/phpstan": "^1.0",
42+
"phpstan/phpstan-symfony": "^1.0",
4343
"symplify/easy-coding-standard": "^9.0"
4444
}
4545
}

src/FormBuilderBundle/Stream/AttachmentStream.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ public function createAttachmentAsset($data, $fieldName, $formName): ?Asset
128128
$asset = Asset::create($formDataFolder->getId(), $assetData, false);
129129
$asset->setProperty(self::PACKAGE_IDENTIFIER, 'text', $packageIdentifier, false, false);
130130
$asset->save();
131-
if (file_exists($zipPath)) {
132-
unlink($zipPath);
133-
}
131+
132+
unlink($zipPath);
133+
134134
} catch (\Exception $e) {
135135
Logger::error(sprintf('Error while storing asset in pimcore (%s): %s', $zipPath, $e->getMessage()));
136136

src/FormBuilderBundle/Validation/ConditionalLogic/Dispatcher/Module/Data/SuccessMessageData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ public function getFlashMessage(?string $locale): ?string
139139
return null;
140140
}
141141

142-
return $this->hasFlashMessage() ? $this->translator->trans((string) $this->data['flashMessage'], [], null, $locale) : null;
142+
return $this->translator->trans((string) $this->data['flashMessage'], [], null, $locale);
143143
}
144144
}

tests/_etc/config/app/config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ doctrine:
1414
dbal:
1515
connections:
1616
default:
17-
options:
18-
1002: 'SET SESSION wait_timeout=30;'
1917
mapping_types:
2018
enum: string
2119
bit: boolean
2220

21+
pimcore_admin:
22+
admin_csp_header:
23+
enabled: false
24+
25+
pimcore:
26+
targeting:
27+
enabled: false
28+
2329
framework:
2430

31+
session:
32+
storage_factory_id: session.storage.factory.native
33+
2534
profiler:
2635
enabled: true
2736
collect: false

tests/_etc/config/app/views/dynamic-multi-file.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
1414
<script type="text/javascript" src="https://rawcdn.githack.com/dachcom-digital/jquery-pimcore-formbuilder/v1.0.0/dist/jquery.fb.core.js"></script>
1515
<script type="text/javascript" src="https://rawcdn.githack.com/dachcom-digital/jquery-pimcore-formbuilder/v1.0.0/dist/jquery.fb.ext.repeater.js"></script>
16-
<script type="text/javascript" src="http://yourjavascript.com/011911157125/dependson-min.js"></script>
16+
<script type="text/javascript" src="https://gistcdn.githack.com/solverat/5a70ea1b21eaff050460294094ec052d/raw/96d9e93f2f7beae8e6828ab46c8ec859d24f3bc8/dependsOn.min.js"></script>
1717
<script>
1818
$(function () {
1919
var $ajaxForms = $('form.formbuilder.ajax-form');

tests/_etc/config/app/views/javascript.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<script type="text/javascript" src="https://rawcdn.githack.com/dachcom-digital/jquery-pimcore-formbuilder/v1.0.0/dist/jquery.fb.core.js"></script>
1515
<script type="text/javascript" src="https://rawcdn.githack.com/dachcom-digital/jquery-pimcore-formbuilder/v1.0.0/dist/jquery.fb.ext.conditional-logic.js"></script>
1616
<script type="text/javascript" src="https://rawcdn.githack.com/dachcom-digital/jquery-pimcore-formbuilder/v1.0.0/dist/jquery.fb.ext.repeater.js"></script>
17-
<script type="text/javascript" src="http://yourjavascript.com/011911157125/dependson-min.js"></script>
17+
<script type="text/javascript" src="https://gistcdn.githack.com/solverat/5a70ea1b21eaff050460294094ec052d/raw/96d9e93f2f7beae8e6828ab46c8ec859d24f3bc8/dependsOn.min.js"></script>
1818
<style>
1919
.fb-cl-hide-element {
2020
display: none;

tests/functional.suite.dist.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ error_level: 'getenv("PIMCORE_PHP_ERROR_REPORTING")'
33
modules:
44
enabled:
55
- \Dachcom\Codeception\Helper\PimcoreCore:
6-
connect_db: true
7-
rebootable_client: true
6+
connect_db: true
7+
rebootable_client: true
88
- \Dachcom\Codeception\Helper\PimcoreBundleCore:
99
run_installer: true
1010
- \Dachcom\Codeception\Helper\Browser\PhpBrowser:

0 commit comments

Comments
 (0)