Fix merge conflict

This commit is contained in:
Emili Castells Guasch 2023-09-07 12:30:50 +02:00
commit 3ae960e4c3
35 changed files with 3374 additions and 1208 deletions

View file

@ -66,7 +66,9 @@ class ItemTest extends TestCase
'description',
$tax,
'sku',
'PHYSICAL_GOODS'
'PHYSICAL_GOODS',
'url',
'image_url'
);
$expected = [
@ -76,6 +78,8 @@ class ItemTest extends TestCase
'description' => 'description',
'sku' => 'sku',
'category' => 'PHYSICAL_GOODS',
'url' => 'url',
'image_url' => 'image_url',
'tax' => [2],
];

View file

@ -52,6 +52,14 @@ class ItemFactoryTest extends TestCase
$woocommerce->session = $session;
$session->shouldReceive('get')->andReturn([]);
when('wp_get_attachment_image_src')->justReturn('image_url');
$product
->expects('get_image_id')
->andReturn(1);
$product
->expects('get_permalink')
->andReturn('url');
$result = $testee->from_wc_cart($cart);
$this->assertCount(1, $result);
@ -107,6 +115,13 @@ class ItemFactoryTest extends TestCase
$woocommerce->session = $session;
$session->shouldReceive('get')->andReturn([]);
when('wp_get_attachment_image_src')->justReturn('image_url');
$product
->expects('get_image_id')
->andReturn(1);
$product
->expects('get_permalink')
->andReturn('url');
$result = $testee->from_wc_cart($cart);
@ -132,6 +147,14 @@ class ItemFactoryTest extends TestCase
expect('wp_strip_all_tags')->andReturnFirstArg();
expect('strip_shortcodes')->andReturnFirstArg();
when('wp_get_attachment_image_src')->justReturn('image_url');
$product
->expects('get_image_id')
->andReturn(1);
$product
->expects('get_permalink')
->andReturn('url');
$item = Mockery::mock(\WC_Order_Item_Product::class);
$item
->expects('get_product')
@ -217,6 +240,14 @@ class ItemFactoryTest extends TestCase
->expects('get_fees')
->andReturn([]);
when('wp_get_attachment_image_src')->justReturn('image_url');
$product
->expects('get_image_id')
->andReturn(1);
$product
->expects('get_permalink')
->andReturn('url');
$result = $testee->from_wc_order($order);
$item = current($result);
/**
@ -271,6 +302,14 @@ class ItemFactoryTest extends TestCase
->expects('get_fees')
->andReturn([]);
when('wp_get_attachment_image_src')->justReturn('image_url');
$product
->expects('get_image_id')
->andReturn(1);
$product
->expects('get_permalink')
->andReturn('url');
$result = $testee->from_wc_order($order);
$item = current($result);
/**