Completed
Pull Request — master (#2)
by Matthew
19:31 queued 04:20
created

ProductWishListControllerExtensionTest::testView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 11
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Dynamic\Wishlist\Test\Extensions;
4
5
use Dynamic\Wishlist\Test\Extra\TestProductWishList;
6
use Dynamic\Wishlist\Test\Extra\TestWishListPage;
7
use SilverStripe\Control\Controller;
8
use SilverStripe\Dev\FunctionalTest;
9
10
/**
11
 * Class ProductWishListControllerExtensionTest
12
 */
13
class ProductWishListControllerExtensionTest extends FunctionalTest
14
{
15
16
    /**
17
     * @var string
18
     */
19
    protected static $fixture_file = '../fixtures.yml';
20
21
    /**
22
     * @var array
23
     */
24
    protected $extraDataObjects = [
25
        TestWishListPage::class,
26
        TestProductWishList::class,
27
    ];
28
29
    /**
30
     *
31
     */
32
    public function testView()
33
    {
34
        $wishList = $this->objFromFixture(TestProductWishList::class, 'one');
35
        /** @var TestWishListPage $wishListPage */
36
        $wishListPage = $this->objFromFixture(TestWishListPage::class, 'one');
37
        $response = $this->get(Controller::join_links(
38
            $wishListPage->Link(),
39
            'view',
40
            $wishList->ID
41
        ));
42
        $this->assertEquals(200, $response->getStatusCode());
43
    }
44
45
}//*/
46