mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-10 12:00:32 +08:00
Fix phpunit
This commit is contained in:
parent
933a80b536
commit
1d9af879ef
1 changed files with 0 additions and 28 deletions
|
@ -31,9 +31,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$product
|
$product
|
||||||
->expects('is_virtual')
|
->expects('is_virtual')
|
||||||
->andReturn(false);
|
->andReturn(false);
|
||||||
$product
|
|
||||||
->expects('get_tax_class')
|
|
||||||
->andReturn('');
|
|
||||||
$items = [
|
$items = [
|
||||||
[
|
[
|
||||||
'data' => $product,
|
'data' => $product,
|
||||||
|
@ -56,9 +53,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$woocommerce->session = $session;
|
$woocommerce->session = $session;
|
||||||
$session->shouldReceive('get')->andReturn([]);
|
$session->shouldReceive('get')->andReturn([]);
|
||||||
|
|
||||||
$tax = Mockery::mock('alias:WC_Tax');
|
|
||||||
$tax->expects('get_rates')->andReturn([]);
|
|
||||||
|
|
||||||
$result = $testee->from_wc_cart($cart);
|
$result = $testee->from_wc_cart($cart);
|
||||||
|
|
||||||
$this->assertCount(1, $result);
|
$this->assertCount(1, $result);
|
||||||
|
@ -92,9 +86,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$product
|
$product
|
||||||
->expects('is_virtual')
|
->expects('is_virtual')
|
||||||
->andReturn(true);
|
->andReturn(true);
|
||||||
$product
|
|
||||||
->expects('get_tax_class')
|
|
||||||
->andReturn('');
|
|
||||||
|
|
||||||
$items = [
|
$items = [
|
||||||
[
|
[
|
||||||
|
@ -118,8 +109,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$woocommerce->session = $session;
|
$woocommerce->session = $session;
|
||||||
$session->shouldReceive('get')->andReturn([]);
|
$session->shouldReceive('get')->andReturn([]);
|
||||||
|
|
||||||
$tax = Mockery::mock('alias:WC_Tax');
|
|
||||||
$tax->expects('get_rates')->andReturn([]);
|
|
||||||
|
|
||||||
$result = $testee->from_wc_cart($cart);
|
$result = $testee->from_wc_cart($cart);
|
||||||
|
|
||||||
|
@ -138,9 +127,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$product
|
$product
|
||||||
->expects('get_sku')
|
->expects('get_sku')
|
||||||
->andReturn('sku');
|
->andReturn('sku');
|
||||||
$product
|
|
||||||
->expects('get_tax_class')
|
|
||||||
->andReturn('foo');
|
|
||||||
$product
|
$product
|
||||||
->expects('is_virtual')
|
->expects('is_virtual')
|
||||||
->andReturn(false);
|
->andReturn(false);
|
||||||
|
@ -174,8 +160,6 @@ class ItemFactoryTest extends TestCase
|
||||||
->expects('get_fees')
|
->expects('get_fees')
|
||||||
->andReturn([]);
|
->andReturn([]);
|
||||||
|
|
||||||
$tax = Mockery::mock('alias:WC_Tax');
|
|
||||||
$tax->expects('get_rates')->andReturn([]);
|
|
||||||
|
|
||||||
$result = $testee->from_wc_order($order);
|
$result = $testee->from_wc_order($order);
|
||||||
$this->assertCount(1, $result);
|
$this->assertCount(1, $result);
|
||||||
|
@ -205,9 +189,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$product
|
$product
|
||||||
->expects('is_virtual')
|
->expects('is_virtual')
|
||||||
->andReturn(true);
|
->andReturn(true);
|
||||||
$product
|
|
||||||
->expects('get_tax_class')
|
|
||||||
->andReturn('foo');
|
|
||||||
|
|
||||||
expect('wp_strip_all_tags')
|
expect('wp_strip_all_tags')
|
||||||
->with('description')
|
->with('description')
|
||||||
|
@ -239,9 +220,6 @@ class ItemFactoryTest extends TestCase
|
||||||
->expects('get_fees')
|
->expects('get_fees')
|
||||||
->andReturn([]);
|
->andReturn([]);
|
||||||
|
|
||||||
$tax = Mockery::mock('alias:WC_Tax');
|
|
||||||
$tax->expects('get_rates')->andReturn([]);
|
|
||||||
|
|
||||||
$result = $testee->from_wc_order($order);
|
$result = $testee->from_wc_order($order);
|
||||||
$item = current($result);
|
$item = current($result);
|
||||||
/**
|
/**
|
||||||
|
@ -266,9 +244,6 @@ class ItemFactoryTest extends TestCase
|
||||||
$product
|
$product
|
||||||
->expects('is_virtual')
|
->expects('is_virtual')
|
||||||
->andReturn(true);
|
->andReturn(true);
|
||||||
$product
|
|
||||||
->expects('get_tax_class')
|
|
||||||
->andReturn('foo');
|
|
||||||
|
|
||||||
expect('wp_strip_all_tags')
|
expect('wp_strip_all_tags')
|
||||||
->with($description)
|
->with($description)
|
||||||
|
@ -300,9 +275,6 @@ class ItemFactoryTest extends TestCase
|
||||||
->expects('get_fees')
|
->expects('get_fees')
|
||||||
->andReturn([]);
|
->andReturn([]);
|
||||||
|
|
||||||
$tax = Mockery::mock('alias:WC_Tax');
|
|
||||||
$tax->expects('get_rates')->andReturn([]);
|
|
||||||
|
|
||||||
$result = $testee->from_wc_order($order);
|
$result = $testee->from_wc_order($order);
|
||||||
$item = current($result);
|
$item = current($result);
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue