Completed
Push — master ( fb1da0...84ba9e )
by Nic
10s
created

ProductWishListControllerExtensionTest::testView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
/**
4
 * Class ProductWishListControllerExtensionTest
5
 */
6
class ProductWishListControllerExtensionTest extends FunctionalTest
7
{
8
9
    /**
10
     * @var string
11
     */
12
    protected static $fixture_file = 'product-wishlist/tests/fixtures.yml';
13
14
    /**
15
     * @var array
16
     */
17
    protected $extraDataObjects = [
18
        'TestWishListPage',
19
        'TestProductWishList',
20
    ];
21
22
    /**
23
     *
24
     */
25
    public function setUp()
26
    {
27
        parent::setUp();
28
        // Suppress themes
29
        //Config::inst()->remove('SSViewer', 'theme');
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
30
        //$config = Config::inst()->get('Director', 'rules');
0 ignored issues
show
Unused Code Comprehensibility introduced by
62% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
31
        //$config = $config + ['test-wishlist-page-path' => 'TestWishListPage_Controller'];
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
32
        //Config::inst()->update('Director', 'rules', ['test-wishlist-page-path' => 'TestWishListPage_Controller']);//*
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
33
    }//*
34
35
    /**
36
     *
37
     */
38
    public function testView()
39
    {
40
        $wishList = $this->objFromFixture('TestProductWishList', 'one');
41
        $response = $this->get('/TestWishListPage_Controller/view/' . $wishList->ID);
42
        $this->assertEquals(200, $response->getStatusCode());
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<ProductWishListControllerExtensionTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
43
    }
44
45
}//*/