File tree Expand file tree Collapse file tree
src/Sylius/Component/Core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ public function getCustomer(): ?BaseCustomerInterface
126126 */
127127 public function setCustomer (?BaseCustomerInterface $ customer ): void
128128 {
129- Assert::isInstanceOf ($ customer , CustomerInterface::class);
129+ Assert::nullOrisInstanceOf ($ customer , CustomerInterface::class);
130130
131131 $ this ->customer = $ customer ;
132132 }
Original file line number Diff line number Diff line change @@ -52,6 +52,12 @@ function its_allows_defining_customer(CustomerInterface $customer): void
5252 $ this ->getCustomer ()->shouldReturn ($ customer );
5353 }
5454
55+ function its_customer_can_be_nullable (): void
56+ {
57+ $ this ->setCustomer (null );
58+ $ this ->getCustomer ()->shouldReturn (null );
59+ }
60+
5561 function its_channel_is_mutable (ChannelInterface $ channel ): void
5662 {
5763 $ this ->setChannel ($ channel );
You can’t perform that action at this time.
0 commit comments