-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OXDEV-7456: Throw exception if no setting was changes and add value e…
…ncoding
- Loading branch information
1 parent
41bc986
commit 39687c2
Showing
9 changed files
with
136 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/Integration/Infrastructure/DecoratedShopSettingEncoder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Integration\Infrastructure; | ||
|
||
use OxidEsales\EshopCommunity\Internal\Framework\Config\Utility\ShopSettingEncoder; | ||
|
||
/** | ||
* This method is needed to execute en/de-coding and also notice if en/de-coder was executed | ||
*/ | ||
class DecoratedShopSettingEncoder extends ShopSettingEncoder | ||
{ | ||
private int $encodeCounter = 0; | ||
private int $decodeCounter = 0; | ||
|
||
public function encode(string $encodingType, $value) | ||
{ | ||
$this->encodeCounter += 1; | ||
return parent::encode($encodingType, $value); | ||
} | ||
|
||
public function decode(string $encodingType, $value) | ||
{ | ||
$this->decodeCounter += 1; | ||
return parent::decode($encodingType, $value); | ||
} | ||
|
||
public function getEncodeCounter(): int | ||
{ | ||
return $this->encodeCounter; | ||
} | ||
|
||
public function getDecodeCounter(): int | ||
{ | ||
return $this->decodeCounter; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.