Skip to content

Commit

Permalink
Fixed errors in the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat authored and JoMessina committed Jan 30, 2024
1 parent 68b0dae commit b9ba56b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/CustomerExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private function rejectErrorResponse(ErrorResponse $response, array $parameters,
$this->logger->error(
$response->getMessage(),
[
'resource' => 'getV1Orders',
'resource' => 'getV1CustomersSearch',
'method' => 'get',
'queryParameters' => $parameters,
'currentPage' => $currentPage,
Expand All @@ -75,7 +75,7 @@ private function rejectInvalidResponse(array $parameters, int $currentPage): Rej
$this->logger->error(
$message = 'The result provided by the API client does not match the expected type. The connector compilation may have fetched incompatible versions.',
[
'resource' => 'getV1Orders',
'resource' => 'getV1CustomersSearch',
'method' => 'get',
'queryParameters' => $parameters,
'currentPage' => $currentPage,
Expand Down
4 changes: 2 additions & 2 deletions src/InvoiceExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private function rejectErrorResponse(ErrorResponse $response, array $parameters,
$this->logger->error(
$response->getMessage(),
[
'resource' => 'getV1Orders',
'resource' => 'getV1Invoices',
'method' => 'get',
'queryParameters' => $parameters,
'currentPage' => $currentPage,
Expand All @@ -73,7 +73,7 @@ private function rejectInvalidResponse(array $parameters, int $currentPage): Rej
$this->logger->error(
$message = 'The result provided by the API client does not match the expected type. The connector compilation may have fetched incompatible versions.',
[
'resource' => 'getV1Orders',
'resource' => 'getV1Invoices',
'method' => 'get',
'queryParameters' => $parameters,
'currentPage' => $currentPage,
Expand Down
2 changes: 1 addition & 1 deletion tests/Filter/ScalarFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function shouldProduceOneVariant(): void
$this->assertCount(1, iterator_to_array($filter->getIterator(), false));
$this->assertContains([
'field' => 'foo',
'value' => 4,
'value' => '4',
'conditionType' => 'eq',
], $filter);
}
Expand Down
10 changes: 5 additions & 5 deletions tests/InvoiceExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Kiboko\Magento\V2\Extractor;
namespace Tests\Kiboko\Component\Flow\Magento2;

use Kiboko\Component\Flow\Magento2\Filter\ScalarFilter;
use Kiboko\Component\Flow\Magento2\FilterGroup;
Expand All @@ -11,9 +11,9 @@
use Kiboko\Component\PHPUnitExtension\Assert\ExtractorAssertTrait;
use Kiboko\Component\PHPUnitExtension\PipelineRunner;
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
use Kiboko\Magento\V2_3\Client;
use Kiboko\Magento\V2_3\Model\SalesDataInvoiceInterface;
use Kiboko\Magento\V2_3\Model\SalesDataInvoiceSearchResultInterface;
use Kiboko\Magento\Client;
use Kiboko\Magento\Model\SalesDataInvoiceInterface;
use Kiboko\Magento\Model\SalesDataInvoiceSearchResultInterface;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;

Expand All @@ -31,7 +31,7 @@ public function testIsSuccessful(): void
$client = $this->createMock(Client::class);
$client
->expects($this->once())
->method('salesInvoiceRepositoryV1GetListGet')
->method('getV1Invoices')
->willReturn(
(new SalesDataInvoiceSearchResultInterface())
->setItems([
Expand Down

0 comments on commit b9ba56b

Please sign in to comment.