From b508e72a9554cb96fb607a6f51c87ba5b4e72fb6 Mon Sep 17 00:00:00 2001 From: mehmet-yoti Date: Thu, 1 Feb 2024 23:02:51 +0000 Subject: [PATCH] www --- .php-cs-fixer.cache | 1 + src/Profile/Service.php | 4 +++- tests/Aml/ResultTest.php | 6 +++++- tests/Profile/BaseProfileTest.php | 2 +- tests/Profile/Util/EncryptedDataTest.php | 6 ++++++ 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .php-cs-fixer.cache diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache new file mode 100644 index 00000000..fd9a69b1 --- /dev/null +++ b/.php-cs-fixer.cache @@ -0,0 +1 @@ +{"php":"8.1.27","version":"3.22.0:v3.22.0#92b019f6c8d79aa26349d0db7671d37440dc0ff3","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"no_unused_imports":true,"ordered_imports":{"imports_order":["const","class","function"]},"php_unit_fqcn_annotation":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true},"hashes":{"\/private\/var\/folders\/b6\/tqq9d7y54ll62fjfysz50ry80000gn\/T\/PHP CS Fixertemp_folder10691\/tests\/Aml\/ResultTest.php":"8e316453dc33c5bb9a1a2efa85e2b986","\/private\/var\/folders\/b6\/tqq9d7y54ll62fjfysz50ry80000gn\/T\/PHP CS Fixertemp_folder7761\/tests\/ShareUrl\/ResultTest.php":"7bc165333b7cd359bbc7e6b68daf4937","\/private\/var\/folders\/b6\/tqq9d7y54ll62fjfysz50ry80000gn\/T\/PHP CS Fixertemp_folder3932\/tests\/Profile\/ServiceTest.php":"5cfa20d1b5052c528fac1e640579f3a6","\/private\/var\/folders\/b6\/tqq9d7y54ll62fjfysz50ry80000gn\/T\/PHP CS Fixertemp_folder4414\/src\/Profile\/Service.php":"c631534c5f622cc343151190bdaf4a0a"}} \ No newline at end of file diff --git a/src/Profile/Service.php b/src/Profile/Service.php index 2e36b911..00d0ff78 100644 --- a/src/Profile/Service.php +++ b/src/Profile/Service.php @@ -63,8 +63,10 @@ public function getActivityDetails(string $encryptedConnectToken): ActivityDetai { // Decrypt connect token $token = $this->decryptConnectToken($encryptedConnectToken); - + error_log("Mas->"); + error_log($this->config->getApiUrl() ?? Constants::API_URL); // Request endpoint + error_log(sprintf('/profile/%s', $token)); $response = (new RequestBuilder($this->config)) ->withBaseUrl($this->config->getApiUrl() ?? Constants::API_URL) ->withEndpoint(sprintf('/profile/%s', $token)) diff --git a/tests/Aml/ResultTest.php b/tests/Aml/ResultTest.php index 76dd42d0..82b49d87 100644 --- a/tests/Aml/ResultTest.php +++ b/tests/Aml/ResultTest.php @@ -5,6 +5,7 @@ namespace Yoti\Test\Aml; use ArgumentCountError; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Http\Message\ResponseInterface; use Yoti\Aml\Result; use Yoti\Test\TestCase; @@ -20,7 +21,10 @@ class ResultTest extends TestCase * @var \Yoti\Aml\Result */ public $amlResult; - + /** + * @var mixed|MockObject|ResponseInterface + */ + private $responseMock; public function setup(): void { $this->responseMock = $this->createMock(ResponseInterface::class); diff --git a/tests/Profile/BaseProfileTest.php b/tests/Profile/BaseProfileTest.php index 71fce4bb..bcf82c5c 100644 --- a/tests/Profile/BaseProfileTest.php +++ b/tests/Profile/BaseProfileTest.php @@ -138,7 +138,7 @@ public function testGetAttributeById() $givenNamesAttribute = new ProtobufAttribute([ 'name' => self::SOME_ATTRIBUTE, - 'value' => utf8_decode('Alan'), + 'value' => 'Alan', 'content_type' => self::CONTENT_TYPE_STRING, ]); $newAttribute = AttributeConverter::convertToYotiAttribute($givenNamesAttribute); diff --git a/tests/Profile/Util/EncryptedDataTest.php b/tests/Profile/Util/EncryptedDataTest.php index 1680c9a8..056535e7 100644 --- a/tests/Profile/Util/EncryptedDataTest.php +++ b/tests/Profile/Util/EncryptedDataTest.php @@ -28,6 +28,12 @@ class EncrypedDataTest extends TestCase */ private $wrappedKey; + /** + * @var EncryptedDataProto + */ + private $encryptedDataProto; + + /** * Setup test data. */