File tree Expand file tree Collapse file tree 4 files changed +7
-87
lines changed
AdobeStockAsset/Test/Integration/Model Expand file tree Collapse file tree 4 files changed +7
-87
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public function search(SearchCriteriaInterface $searchCriteria): SearchResultInt
3535 $ searchResult = new SearchResult ();
3636 $ searchResult ->setSearchCriteria ($ searchCriteria );
3737 $ searchResult ->setItems ($ items );
38- $ searchResult ->setTotalCount (3 );
38+ $ searchResult ->setTotalCount (1 );
3939
4040 return $ searchResult ;
4141 }
@@ -64,40 +64,6 @@ private function getStockFiles(): array
6464 ],
6565 'category_id ' => 1
6666 ]
67- ],
68- [
69- 'id ' => 2 ,
70- 'custom_attributes ' => [
71- 'id_field_name ' => 'id ' ,
72- 'id ' => 2 ,
73- 'thumbnail_240_url ' => 'https://test.url/2 ' ,
74- 'width ' => 120 ,
75- 'height ' => 220 ,
76- 'comp_url ' => 'https://test.url/2 ' ,
77- 'category ' => [
78- 'id ' => 1 ,
79- 'name ' => 'Test ' ,
80- 'link ' => null
81- ],
82- 'category_id ' => 1
83- ]
84- ],
85- [
86- 'id ' => 3 ,
87- 'custom_attributes ' => [
88- 'id_field_name ' => 'id ' ,
89- 'id ' => 3 ,
90- 'thumbnail_240_url ' => 'https://test.url/3 ' ,
91- 'width ' => 130 ,
92- 'height ' => 230 ,
93- 'comp_url ' => 'https://test.url/3 ' ,
94- 'category ' => [
95- 'id ' => 1 ,
96- 'name ' => 'Test ' ,
97- 'link ' => null
98- ],
99- 'category_id ' => 1
100- ],
10167 ]
10268 ];
10369
Original file line number Diff line number Diff line change 88namespace Magento \AdobeStockAsset \Test \Integration \Model ;
99
1010use Magento \AdobeStockAssetApi \Api \GetAssetByIdInterface ;
11- use Magento \AdobeStockAssetApi \Api \GetAssetListInterface ;
11+ use Magento \AdobeStockClientApi \Api \ClientInterface ;
1212use Magento \Framework \Api \Search \DocumentInterface ;
1313use Magento \TestFramework \Helper \Bootstrap ;
1414use PHPUnit \Framework \TestCase ;
@@ -24,7 +24,7 @@ protected function setUp(): void
2424 {
2525 Bootstrap::getObjectManager ()->configure ([
2626 'preferences ' => [
27- GetAssetListInterface ::class => GetAssetListMock ::class
27+ ClientInterface ::class => ClientMock ::class
2828 ]
2929 ]);
3030
@@ -34,10 +34,10 @@ protected function setUp(): void
3434 public function testExecute (): void
3535 {
3636 /** @var DocumentInterface $searchResults */
37- $ searchResults = $ this ->getAssetById ->execute (123455678 );
37+ $ searchResults = $ this ->getAssetById ->execute (1 );
3838
3939 $ this ->assertInstanceOf (DocumentInterface::class, $ searchResults );
4040 $ this ->assertNotEmpty ($ searchResults );
41- $ this ->assertEquals (123455678 , $ searchResults ->getId ());
41+ $ this ->assertEquals (1 , $ searchResults ->getId ());
4242 }
4343}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function testExecute(): void
6363 $ searchResults = $ this ->getAssetList ->execute ($ searchCriteria );
6464
6565 $ this ->assertInstanceOf (SearchResultInterface::class, $ searchResults );
66- $ this ->assertEquals (3 , $ searchResults ->getTotalCount ());
67- $ this ->assertCount (3 , array_values ($ searchResults ->getItems ()));
66+ $ this ->assertEquals (1 , $ searchResults ->getTotalCount ());
67+ $ this ->assertCount (1 , array_values ($ searchResults ->getItems ()));
6868 }
6969}
You can’t perform that action at this time.
0 commit comments