| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class SubscriptionSpec extends ObjectBehavior |
||
| 21 | { |
||
| 22 | function it_is_initializable(): void |
||
|
|
|||
| 23 | { |
||
| 24 | $this->shouldHaveType(Subscription::class); |
||
| 25 | } |
||
| 26 | |||
| 27 | function it_implements_subscription_interface(): void |
||
| 28 | { |
||
| 29 | $this->shouldHaveType(SubscriptionInterface::class); |
||
| 30 | } |
||
| 31 | |||
| 32 | function it_has_null_id_by_default(): void |
||
| 33 | { |
||
| 34 | $this->getId()->shouldReturn(null); |
||
| 35 | } |
||
| 36 | |||
| 37 | function it_gets_order(OrderInterface $order): void |
||
| 38 | { |
||
| 39 | $this->setOrder($order); |
||
| 40 | $this->getOrder()->shouldReturn($order); |
||
| 41 | } |
||
| 42 | |||
| 43 | function it_gets_state(): void |
||
| 44 | { |
||
| 45 | $this->setState('active'); |
||
| 46 | $this->getState()->shouldReturn('active'); |
||
| 47 | } |
||
| 48 | |||
| 49 | function it_gets_subscription_id(): void |
||
| 53 | } |
||
| 54 | |||
| 55 | function it_gets_customer_id(): void |
||
| 59 | } |
||
| 60 | } |
||
| 61 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.