From 379bc6e12eb0ef13c7b3aff2d52e3eb0fc1c8fa0 Mon Sep 17 00:00:00 2001 From: Mike van den Hoek Date: Tue, 6 Apr 2021 13:25:14 +0200 Subject: [PATCH] (feat): add emergency button --- CHANGELOG.md | 7 ++ config/api.php | 25 ++++---- config/escape_element_metabox.php | 27 ++++++++ config/settings.php | 6 ++ languages/openpub-base-nl_NL.mo | Bin 7336 -> 7660 bytes languages/openpub-base-nl_NL.po | 47 ++++++++++---- languages/openpub-base.pot | 40 +++++++++--- openpub-base.php | 2 +- src/Base/Foundation/Plugin.php | 2 +- src/Base/Metabox/MetaboxServiceProvider.php | 9 ++- src/Base/Models/Item.php | 7 +- .../RestAPI/ItemFields/EscapeElementField.php | 39 ++++++++++++ src/Base/Settings/SettingsPageOptions.php | 11 +++- src/Base/Settings/SettingsServiceProvider.php | 4 +- .../Metabox/MetaboxServiceProviderTest.php | 60 ++++++++++++++++-- .../Base/Settings/SettingsPageOptionsTest.php | 16 ++++- .../Settings/SettingsServiceProviderTest.php | 2 + 17 files changed, 253 insertions(+), 51 deletions(-) create mode 100644 config/escape_element_metabox.php create mode 100644 src/Base/RestAPI/ItemFields/EscapeElementField.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b11fd1..9afa0e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Version [2.0.4] + +### Feat + +- Add escape element setting to openpub-settings. +- Add escape element setting in editor of openpub-item. + ## Version [2.0.3] ### Fix: diff --git a/config/api.php b/config/api.php index d81a916..d2bf522 100644 --- a/config/api.php +++ b/config/api.php @@ -12,18 +12,19 @@ */ 'item' => [ 'fields' => [ - 'comments' => OWC\OpenPub\Base\RestAPI\ItemFields\CommentField::class, - 'connected' => OWC\OpenPub\Base\RestAPI\ItemFields\ConnectedField::class, - 'portal_url' => OWC\OpenPub\Base\RestAPI\ItemFields\PortalURL::class, - 'date_modified' => OWC\OpenPub\Base\RestAPI\ItemFields\DateModified::class, - 'downloads' => OWC\OpenPub\Base\RestAPI\ItemFields\DownloadsField::class, - 'expired' => OWC\OpenPub\Base\RestAPI\ItemFields\ExpiredField::class, - 'highlighted' => OWC\OpenPub\Base\RestAPI\ItemFields\HighlightedItemField::class, - 'image' => OWC\OpenPub\Base\RestAPI\ItemFields\FeaturedImageField::class, - 'links' => OWC\OpenPub\Base\RestAPI\ItemFields\LinksField::class, - 'notes' => OWC\OpenPub\Base\RestAPI\ItemFields\NotesField::class, - 'synonyms' => OWC\OpenPub\Base\RestAPI\ItemFields\SynonymsField::class, - 'taxonomies' => OWC\OpenPub\Base\RestAPI\ItemFields\TaxonomyField::class, + 'comments' => OWC\OpenPub\Base\RestAPI\ItemFields\CommentField::class, + 'connected' => OWC\OpenPub\Base\RestAPI\ItemFields\ConnectedField::class, + 'portal_url' => OWC\OpenPub\Base\RestAPI\ItemFields\PortalURL::class, + 'date_modified' => OWC\OpenPub\Base\RestAPI\ItemFields\DateModified::class, + 'downloads' => OWC\OpenPub\Base\RestAPI\ItemFields\DownloadsField::class, + 'expired' => OWC\OpenPub\Base\RestAPI\ItemFields\ExpiredField::class, + 'highlighted' => OWC\OpenPub\Base\RestAPI\ItemFields\HighlightedItemField::class, + 'image' => OWC\OpenPub\Base\RestAPI\ItemFields\FeaturedImageField::class, + 'links' => OWC\OpenPub\Base\RestAPI\ItemFields\LinksField::class, + 'notes' => OWC\OpenPub\Base\RestAPI\ItemFields\NotesField::class, + 'synonyms' => OWC\OpenPub\Base\RestAPI\ItemFields\SynonymsField::class, + 'taxonomies' => OWC\OpenPub\Base\RestAPI\ItemFields\TaxonomyField::class, + 'escape_element' => OWC\OpenPub\Base\RestAPI\ItemFields\EscapeElementField::class, ], ], 'theme' => [ diff --git a/config/escape_element_metabox.php b/config/escape_element_metabox.php new file mode 100644 index 0000000..914a446 --- /dev/null +++ b/config/escape_element_metabox.php @@ -0,0 +1,27 @@ + [ + 'id' => 'escape_element', + 'title' => __('Escape element', 'openpub-base'), + 'post_types' => ['openpub-item'], + 'context' => 'normal', + 'priority' => 'low', + 'autosave' => true, + 'fields' => [ + 'settings' => [ + [ + 'name' => __('Enable escape element', 'openpub-base'), + 'desc' => __('Show escape element on portal page.', 'openpub-base'), + 'id' => 'escape_element_active', + 'type' => 'radio', + 'options' => [ + '1' => __('Yes', 'openpub-base'), + '0' => __('No', 'openpub-base'), + ], + 'std' => '0', + ], + ] + ] + ] +]; diff --git a/config/settings.php b/config/settings.php index 0cf8279..8dac708 100644 --- a/config/settings.php +++ b/config/settings.php @@ -25,6 +25,12 @@ 'desc' => __('Use portal url in api.', 'openpub-base'), 'id' => 'setting_use_portal_url', 'type' => 'checkbox', + ], + 'openpub_use_escape_element' => [ + 'name' => __('Escape element', 'openpub-base'), + 'desc' => __('Enable escape element.', 'openpub-base'), + 'id' => 'setting_use_escape_element', + 'type' => 'checkbox', ] ], ], diff --git a/languages/openpub-base-nl_NL.mo b/languages/openpub-base-nl_NL.mo index 7f9d2a0217c1f250db33365875be10d5c9816b3f..0848285fee3a36dfab9c5d575e9311e7f9dc997b 100644 GIT binary patch delta 2721 zcmZ|PeN5F=9LMp)v!FbP3itqAxe%dn$u#3h#1hDBf}%lURu}rkgWLy!^q=z1^+2_@ z!sgP}@{d>{ZLaOkv{@@#E!S3NEp@K7R@mY!txX@w5L;zslaD26OUjPeu6Xbti3;v>D*t%0!&OZ z#)WRwysI%EeK-@t$oQ}srNfUoz-2a0pa#5;ZajsF_y=miKQRMSrW?arCI|K0g-W0T z8DeVfeG|^%eiPF<#`yv~x*iebY@R9{uRT5a!}2D$|3g5+21__%+VOi>Qeccx^2> z8%uB=@+;GT{FrrIG;RxO3kI+dpT%$yoe4Uc;4@UIzCyk6MN|TRVIHP&qc?P;?mehP zno$Y*Pz&s`_pjLdcTnTb;5@v9s?3Z`>aP;#P*-KR7+K5Ip-S!Ll8v3Hv*1USdK6WO zm+kKl+2_YmiF}Gmt| z^A2l2F68-Rs4X~v8aIx5lf$S5K0K;P^JC=S<9S6z2ODao?bz{={3}Rf1@gq%u$z_sPTEIac&H2 zU>O}{xCC_;>QSZLV4wStYMB7)vw8~4aSS!_Db${yLnZtxYN3Sru``i@I^21vM2k@g zl+CC98d%8#B~XK_vDprI4pquMs6<~wRpL$5=lC9~5|^xL?2{67V+F3lehlJfJcsLX z8H1GYlljzNZ@Qlcn)o0pkz=S*pFm}P2K6uc2UO-iVjL=YRYt9ysEYPtm)n8$%u4&L z3mxJvLUVKzJ=%XAnwtnU<~0uztB5*c6QPXThybBatdUTeONgz6wqk1Ya8pgF0+qx= zL?NMeUySHKB^}1_GA`SQ6@-fj5h~5pwr(;9Nxy90xnv9Ni4Dz8*We?4 z+ZZ)G6!3-qUH5;Udra%~10ySPlH%f9oJd3N`uOr2e(BojIDuU)POq7o+qAVxbLzCUQn#j=E6p@ZUCqYI(g@7DL~fI$ zsEr9Lqc9o;CDARA{6mP81S6wF1~H?Bh)AVnA^l`Scl%Q5+~y(%*I#H4!bcA-$vRB`{MQe=l~8OpYUBg zAH*Ea&!W%$fleT6R0tzNl1{1EaT(fiH9FJ!XfxXJMjU}pA#H?hI1D?`f$TyX?nOSK zpM%eRf_{Gx6L7X7)*RfIE;!LNA)(ck{@90hJUNOzmMb1K*(6hvM}=(E(gS2QZ$e9dHfW@rr0W zI)E;mg?rJN51<1$iSFy)kWct4pZwoUC5LZqaBj32$8z3|3EY8=_#QUkIjq2W_#S<4Ey{`xzU>TZ;ax|s$b*nfL(q z;XU{}I^ud3)ETZq8*W7hvJFjf7dr6W=z#WO2Kwu_idap=|Ff{1`V!(%!u=O!LL*@+ z7ZUz^Jw{k=As!?a5H}M1Ifl8!CSo>mFR_kjB^+1gr$m@ny!WL2;QE~KNUBF z>ph2XV^tH2iCUtZu(&VSH&>Jz&h8@IToyO&-Na3VJ3K-7+hDnsaIb72))4NujV`LM z%H?G`C+p({H{GIGcY}pg$H-$DJ+F@%?CHrJlj_Vpotf&+KbM*6D(K8kEiKN@=y|bZ bT+de}MXAn`37M&HOAE4wFWK7Cz9swvNMXmw diff --git a/languages/openpub-base-nl_NL.po b/languages/openpub-base-nl_NL.po index a086bef..7a844f1 100644 --- a/languages/openpub-base-nl_NL.po +++ b/languages/openpub-base-nl_NL.po @@ -21,6 +21,26 @@ msgstr "" "X-Poedit-SearchPath-1: src\n" "X-Poedit-SearchPathExcluded-0: vendor\n" +#: config/escape_element_metabox.php:6 config/settings.php:30 +msgid "Escape element" +msgstr "Ontsnap element" + +#: config/escape_element_metabox.php:14 +msgid "Enable escape element" +msgstr "Gebruik ontsnap element" + +#: config/escape_element_metabox.php:15 +msgid "Show escape element on portal page." +msgstr "Ontsnap element weergeven op portaal pagina." + +#: config/escape_element_metabox.php:19 +msgid "Yes" +msgstr "Ja" + +#: config/escape_element_metabox.php:20 +msgid "No" +msgstr "Nee" + #: config/metaboxes.php:6 msgid "Data" msgstr "Gegevens" @@ -30,11 +50,8 @@ msgid "Highlighted item" msgstr "Uitgelichte item" #: config/metaboxes.php:15 -msgid "" -"Use this option to select current item to be a highlighted (featured) item" -msgstr "" -"Gebruik deze optie om het huidige item te selecteren als een uitgelicht " -"(gekenmerkt) item" +msgid "Use this option to select current item to be a highlighted (featured) item" +msgstr "Gebruik deze optie om het huidige item te selecteren als een uitgelicht (gekenmerkt) item" #: config/metaboxes.php:20 msgid "Synonyms" @@ -371,11 +388,11 @@ msgstr "Portal" msgid "Portal URL" msgstr "Portal URL" -#: config/settings.php:19 +#: config/settings.php:18 msgid "Portal OpenPub item slug" msgstr "Portal OpenPub item slug" -#: config/settings.php:20 +#: config/settings.php:19 msgid "URL for OpenPub items in the portal, eg \"onderwerp\"" msgstr "URL voor OpenPub items in de portal, bv \"onderwerp\"" @@ -383,27 +400,31 @@ msgstr "URL voor OpenPub items in de portal, bv \"onderwerp\"" msgid "Use portal url in api." msgstr "Gebruik portal url in de api." -#: config/settings.php:29 +#: config/settings.php:31 +msgid "Enable escape element." +msgstr "Gebruik ontsnap element." + +#: config/settings.php:40 msgid "Elasticsearch" msgstr "Elasticsearch" -#: config/settings.php:36 +#: config/settings.php:47 msgid "Instance url" msgstr "Instance url" -#: config/settings.php:37 config/settings.php:43 +#: config/settings.php:48 config/settings.php:54 msgid "URL inclusief http(s)://" msgstr "URL inclusief http(s)://" -#: config/settings.php:42 +#: config/settings.php:53 msgid "Instance shield" msgstr "Instance user/wachtwoord" -#: config/settings.php:48 +#: config/settings.php:59 msgid "Instance prefix" msgstr "Instance prefix" -#: config/settings.php:49 +#: config/settings.php:60 msgid "Use this prefix to group multiple instances" msgstr "" "Dit voorvoegsel wordt gebruikt om meerdere bronnen in ElasticSearch te " diff --git a/languages/openpub-base.pot b/languages/openpub-base.pot index a7f9e2b..15f4152 100644 --- a/languages/openpub-base.pot +++ b/languages/openpub-base.pot @@ -26,6 +26,26 @@ msgstr "" "X-Poedit-SearchPathExcluded-1: node_modules\n" "X-Poedit-SearchPathExcluded-2: vendor\n" +#: config/escape_element_metabox.php:6 config/settings.php:30 +msgid "Escape element" +msgstr "" + +#: config/escape_element_metabox.php:14 +msgid "Enable escape element" +msgstr "" + +#: config/escape_element_metabox.php:15 +msgid "Show escape element on portal page." +msgstr "" + +#: config/escape_element_metabox.php:19 +msgid "Yes" +msgstr "" + +#: config/escape_element_metabox.php:20 +msgid "No" +msgstr "" + #: config/metaboxes.php:6 msgid "Data" msgstr "" @@ -261,11 +281,11 @@ msgstr "" msgid "Portal URL" msgstr "" -#: config/settings.php:19 +#: config/settings.php:18 msgid "Portal OpenPub item slug" msgstr "" -#: config/settings.php:20 +#: config/settings.php:19 msgid "URL for OpenPub items in the portal, eg \"onderwerp\"" msgstr "" @@ -273,27 +293,31 @@ msgstr "" msgid "Use portal url in api." msgstr "" -#: config/settings.php:29 +#: config/settings.php:31 +msgid "Enable escape element." +msgstr "" + +#: config/settings.php:40 msgid "Elasticsearch" msgstr "" -#: config/settings.php:36 +#: config/settings.php:47 msgid "Instance url" msgstr "" -#: config/settings.php:37 config/settings.php:43 +#: config/settings.php:48 config/settings.php:54 msgid "URL inclusief http(s)://" msgstr "" -#: config/settings.php:42 +#: config/settings.php:53 msgid "Instance shield" msgstr "" -#: config/settings.php:48 +#: config/settings.php:59 msgid "Instance prefix" msgstr "" -#: config/settings.php:49 +#: config/settings.php:60 msgid "Use this prefix to group multiple instances" msgstr "" diff --git a/openpub-base.php b/openpub-base.php index 802468b..95d7d24 100644 --- a/openpub-base.php +++ b/openpub-base.php @@ -4,7 +4,7 @@ * Plugin Name: Yard | OpenPub Base * Plugin URI: https://www.openwebconcept.nl/ * Description: Acts as foundation for other OpenPub related content plugins. This plugin implements actions to allow for other plugins to add and/or change Custom Posttypes, Metaboxes, Taxonomies, en Posts 2 posts relations. - * Version: 2.0.3 + * Version: 2.0.4 * Author: Yard | Digital Agency * Author URI: https://www.yard.nl/ * License: GPL-3.0 diff --git a/src/Base/Foundation/Plugin.php b/src/Base/Foundation/Plugin.php index db947c8..05729ad 100644 --- a/src/Base/Foundation/Plugin.php +++ b/src/Base/Foundation/Plugin.php @@ -25,7 +25,7 @@ class Plugin * * @var string VERSION */ - const VERSION = '2.0.3'; + const VERSION = '2.0.4'; /** * Path to the root of the plugin. diff --git a/src/Base/Metabox/MetaboxServiceProvider.php b/src/Base/Metabox/MetaboxServiceProvider.php index 5168368..c9fe264 100644 --- a/src/Base/Metabox/MetaboxServiceProvider.php +++ b/src/Base/Metabox/MetaboxServiceProvider.php @@ -18,8 +18,13 @@ public function register() */ public function registerMetaboxes($rwmbMetaboxes) { - $configMetaboxes = $this->plugin->config->get('metaboxes'); - $metaboxes = []; + $configMetaboxes = $this->plugin->config->get('metaboxes'); + + if ($this->plugin->settings->useEscapeElement()) { + $configMetaboxes = array_merge($configMetaboxes, $this->plugin->config->get('escape_element_metabox')); + } + + $metaboxes = []; foreach ($configMetaboxes as $metabox) { $metaboxes[] = $this->processMetabox($metabox); diff --git a/src/Base/Models/Item.php b/src/Base/Models/Item.php index d9216a0..f8ae6fb 100644 --- a/src/Base/Models/Item.php +++ b/src/Base/Models/Item.php @@ -43,7 +43,7 @@ class Item public function __construct(array $data, array $meta = null) { $this->data = $data; - $this->meta = is_null($meta) ? [] : $meta; + $this->meta = is_null($meta) ? get_post_meta($data['ID']) : $meta; } /** @@ -255,6 +255,11 @@ public function getMeta(string $value, string $default = '', bool $single = true return $single ? current($this->meta[$prefix]) : $this->meta[$prefix]; } + public function getEscapeElement(): bool + { + return $this->getMeta('escape_element_active', '0', true, '_owc_'); + } + public function getPortalURL(): string { return $this->createPortalURL(); diff --git a/src/Base/RestAPI/ItemFields/EscapeElementField.php b/src/Base/RestAPI/ItemFields/EscapeElementField.php new file mode 100644 index 0000000..911fa8f --- /dev/null +++ b/src/Base/RestAPI/ItemFields/EscapeElementField.php @@ -0,0 +1,39 @@ +plugin->settings->useEscapeElement(); + }; + } + + /** + * Create the identifications field for a given post. + * + * @param WP_Post $post + * + * @return bool + */ + public function create(WP_Post $post): bool + { + $itemModel = new Item($post->to_array()); + + return $itemModel->getEscapeElement(); + } +} diff --git a/src/Base/Settings/SettingsPageOptions.php b/src/Base/Settings/SettingsPageOptions.php index cd0817c..090e33a 100644 --- a/src/Base/Settings/SettingsPageOptions.php +++ b/src/Base/Settings/SettingsPageOptions.php @@ -42,11 +42,18 @@ public function usePortalURL(): string return $this->settings['_owc_setting_use_portal_url'] ?? ''; } + public function useEscapeElement(): bool + { + return $this->settings['_owc_setting_use_escape_element'] ?? false; + } + public static function make(): self { $defaultSettings = [ - '_owc_setting_portal_url' => '', - '_owc_setting_portal_openpub_item_slug' => '', + '_owc_setting_portal_url' => '', + '_owc_setting_portal_openpub_item_slug' => '', + '_owc_setting_use_portal_url' => 0, + '_owc_setting_use_escape_element' => 0 ]; return new static(wp_parse_args(get_option('_owc_openpub_base_settings'), $defaultSettings)); diff --git a/src/Base/Settings/SettingsServiceProvider.php b/src/Base/Settings/SettingsServiceProvider.php index 0b1f753..007f370 100644 --- a/src/Base/Settings/SettingsServiceProvider.php +++ b/src/Base/Settings/SettingsServiceProvider.php @@ -38,8 +38,8 @@ public function registerSettingsPage($rwmbSettingsPages) */ public function registerSettings($rwmbMetaboxes) { - $configMetaboxes = $this->plugin->config->get('settings'); - $metaboxes = []; + $configMetaboxes = $this->plugin->config->get('settings'); + $metaboxes = []; foreach ($configMetaboxes as $metabox) { $metaboxes[] = $this->processMetabox($metabox); diff --git a/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php b/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php index d72f715..0bd6eb0 100644 --- a/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php +++ b/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php @@ -18,17 +18,19 @@ protected function setUp(): void \WP_Mock::userFunction('wp_parse_args', [ 'return' => [ - '_owc_setting_portal_url' => '', - '_owc_setting_portal_pdc_item_slug' => '', - '_owc_setting_use_portal_url' => 0, + '_owc_setting_portal_url' => '', + '_owc_setting_portal_pdc_item_slug' => '', + '_owc_setting_use_portal_url' => 0, + '_owc_setting_use_escape_element' => 1 ] ]); \WP_Mock::userFunction('get_option', [ 'return' => [ - '_owc_setting_portal_url' => '', - '_owc_setting_portal_pdc_item_slug' => '', - '_owc_setting_use_portal_url' => 0, + '_owc_setting_portal_url' => '', + '_owc_setting_portal_pdc_item_slug' => '', + '_owc_setting_use_portal_url' => 0, + '_owc_setting_use_escape_element' => 1 ] ]); } @@ -75,6 +77,22 @@ public function check_registration_of_metaboxes() ] ] ] + ], + 'escape_element' => [ + 'id' => 'escape_element', + 'fields' => [ + 'general' => [ + 'testfield_noid' => [ + 'type' => 'heading' + ], + 'testfield1' => [ + 'id' => 'metabox_id1' + ], + 'testfield2' => [ + 'id' => 'metabox_id2' + ] + ] + ] ] ]; @@ -94,10 +112,25 @@ public function check_registration_of_metaboxes() 'id' => $prefix . 'metabox_id2' ] ] + ], + 1 => [ + 'id' => 'escape_element', + 'fields' => [ + [ + 'type' => 'heading' + ], + [ + 'id' => $prefix . 'metabox_id1' + ], + [ + 'id' => $prefix . 'metabox_id2' + ] + ] ] ]; $config->shouldReceive('get')->with('metaboxes')->once()->andReturn($configMetaboxes); + $config->shouldReceive('get')->with('escape_element_metabox')->once()->andReturn($configMetaboxes); //test for filter being called \WP_Mock::expectFilter('owc/openpub/base/before-register-metaboxes', $expectedMetaboxes); @@ -150,10 +183,25 @@ public function check_registration_of_metaboxes() 'id' => $prefix . 'metabox_id2' ] ] + ], + 2 => [ + 'id' => 'escape_element', + 'fields' => [ + [ + 'type' => 'heading' + ], + [ + 'id' => $prefix . 'metabox_id1' + ], + [ + 'id' => $prefix . 'metabox_id2' + ] + ] ] ]; $config->shouldReceive('get')->with('metaboxes')->once()->andReturn($configMetaboxes); + $config->shouldReceive('get')->with('escape_element_metabox')->once()->andReturn($configMetaboxes); $this->assertEquals($expectedMetaboxesAfterMerge, $service->registerMetaboxes($existingMetaboxes)); } diff --git a/tests/Unit/Base/Settings/SettingsPageOptionsTest.php b/tests/Unit/Base/Settings/SettingsPageOptionsTest.php index d00d827..321658c 100644 --- a/tests/Unit/Base/Settings/SettingsPageOptionsTest.php +++ b/tests/Unit/Base/Settings/SettingsPageOptionsTest.php @@ -15,9 +15,10 @@ public function setUp(): void \WP_Mock::setUp(); $this->settingsPageOptions = new SettingsPageOptions([ - '_owc_setting_portal_url' => 'www.test.nl', - '_owc_setting_portal_openpub_item_slug' => 'direct/regelen', - '_owc_setting_use_portal_url' => 0, + '_owc_setting_portal_url' => 'www.test.nl', + '_owc_setting_portal_openpub_item_slug' => 'direct/regelen', + '_owc_setting_use_portal_url' => 0, + '_owc_setting_use_escape_element' => 0 ]); } @@ -26,6 +27,15 @@ public function tearDown(): void \WP_Mock::tearDown(); } + /** @test */ + public function do_not_use_escape_element_setting(): void + { + $expectedResult = false; + $result = $this->settingsPageOptions->useEscapeElement(); + + $this->assertEquals($expectedResult, $result); + } + /** @test */ public function portal_url_has_value(): void { diff --git a/tests/Unit/Base/Settings/SettingsServiceProviderTest.php b/tests/Unit/Base/Settings/SettingsServiceProviderTest.php index e0520c2..021f9d5 100644 --- a/tests/Unit/Base/Settings/SettingsServiceProviderTest.php +++ b/tests/Unit/Base/Settings/SettingsServiceProviderTest.php @@ -20,6 +20,7 @@ public function setUp(): void '_owc_setting_portal_url' => '', '_owc_setting_portal_openpub_item_slug' => '', '_owc_setting_use_portal_url' => 0, + '_owc_setting_use_escape_element' => 0 ] ]); @@ -28,6 +29,7 @@ public function setUp(): void '_owc_setting_portal_url' => '', '_owc_setting_portal_openpub_item_slug' => '', '_owc_setting_use_portal_url' => 0, + '_owc_setting_use_escape_element' => 0 ] ]);