GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#14)
by Michael
25:57 queued 15:32
created

EbayEnterprise_Tax_Test_Helper_Item_SelectionTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A provideItems() 0 12 2
A testSelectFrom() 0 9 1
1
<?php
2
/**
3
 * Copyright (c) 2013-2014 eBay Enterprise, Inc.
4
 *
5
 * NOTICE OF LICENSE
6
 *
7
 * This source file is subject to the Open Software License (OSL 3.0)
8
 * that is bundled with this package in the file LICENSE.md.
9
 * It is also available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * @copyright   Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
13
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
14
 */
15
16
class EbayEnterprise_Tax_Test_Helper_Item_SelectionTest extends EcomDev_PHPUnit_Test_Case
17
{
18
    public function provideItems()
19
    {
20
        $items = [];
21
        foreach(range(0, 1) as $i) {
22
            $item = $this->getModelMock('sales/quote_item_abstract', ['itemIsConfigurableChild'], true);
23
            $item
24
                ->method('itemIsConfigurableChild')
25
                ->willReturn((bool) $i);
26
            $items[] = $item;
27
        }
28
        return [[$items]];
29
    }
30
31
    /**
32
     * Test filtering child configurable items.
33
     *
34
     * @dataProvider provideItems
35
     */
36
    public function testSelectFrom(array $items)
37
    {
38
        $helper = Mage::helper('ebayenterprise_tax/item_selection');
39
        $selected = $helper->selectFrom($items);
40
        $this->assertCount(2, $items);
41
        $this->assertCount(1, $selected);
42
        $this->assertContainsOnlyInstancesOf('Mage_Sales_Model_Quote_Item_Abstract', $items);
43
        $this->assertContainsOnlyInstancesOf('Mage_Sales_Model_Quote_Item_Abstract', $selected);
44
    }
45
}
46