Completed
Pull Request — master (#7)
by Jason
12:37
created

testFoxyStripePurchaseForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Dynamic\FoxyStripe\Test;
4
5
use Dynamic\FoxyStripe\Test\TestProduct;
6
use SilverStripe\Forms\FieldList;
7
8
class FoxyStripeInventoryManagerTest extends FoxyStripeInventoryTest
9
{
10
    /**
11
     *
12
     */
13
    public function testUpdateCMSFields()
14
    {
15
        $object = $this->objFromFixture(TestProduct::class, 'one');
16
        $fields = $object->getCMSFields();
17
        $this->assertInstanceOf(FieldList::class, $fields);
18
        $this->assertNotNull($fields->dataFieldByName('ControlInventory'));
19
    }
20
21
    /**
22
     *
23
     */
24
    public function testFoxyStripePurchaseForm()
25
    {
26
        $object = $this->objFromFixture(TestProduct::class, 'one');
27
        $controller = new TestProduct_Controller($object);
28
        $this->assertFalse($controller->PurchaseForm());
0 ignored issues
show
Bug introduced by
$controller->PurchaseForm() of type Dynamic\FoxyStripe\Form\FoxyStripePurchaseForm is incompatible with the type boolean expected by parameter $condition of PHPUnit_Framework_Assert::assertFalse(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

28
        $this->assertFalse(/** @scrutinizer ignore-type */ $controller->PurchaseForm());
Loading history...
29
    }
30
}