shouldHaveType(Block::class); } function it_is_a_resource(): void { $this->shouldHaveType(ResourceInterface::class); } function it_implements_block_interface(): void { $this->shouldHaveType(BlockInterface::class); } function it_toggles(): void { $this->enable(); $this->isEnabled()->shouldReturn(true); $this->disable(); $this->isEnabled()->shouldReturn(false); } function it_associates_products(ProductInterface $firstProduct, ProductInterface $secondProduct): void { $this->addProduct($firstProduct); $this->hasProduct($firstProduct)->shouldReturn(true); $this->hasProduct($secondProduct)->shouldReturn(false); $this->removeProduct($firstProduct); $this->hasProduct($firstProduct)->shouldReturn(false); } function it_associates_sections(SectionInterface $firstSection, SectionInterface $secondSection): void { $this->addSection($firstSection); $this->hasSection($firstSection)->shouldReturn(true); $this->hasSection($secondSection)->shouldReturn(false); $this->removeSection($firstSection); $this->hasSection($firstSection)->shouldReturn(false); } function it_associates_channels(ChannelInterface $firstChannel, ChannelInterface $secondChannel): void { $this->addChannel($firstChannel); $this->hasChannel($firstChannel)->shouldReturn(true); $this->hasChannel($secondChannel)->shouldReturn(false); $this->removeChannel($firstChannel); $this->hasChannel($firstChannel)->shouldReturn(false); } function it_associates_taxons(TaxonInterface $firstTaxon, TaxonInterface $secondTaxon): void { $this->addTaxon($firstTaxon); $this->hasTaxon($firstTaxon)->shouldReturn(true); $this->hasTaxon($secondTaxon)->shouldReturn(false); $this->removeTaxon($firstTaxon); $this->hasTaxon($secondTaxon)->shouldReturn(false); } }