parse(''); $section = $document->children()[0]; self::assertTrue($section->isOpaque()); $this->expectException(LogicException::class); $section->insertChild(0, Block::create('divi/text')); } public function testInsertChildRefusesOnABlockWithUndecodableAttrs(): void { $document = (new Parser())->parse(''); $section = $document->children()[0]; self::assertTrue($section->isOpaque()); $this->expectException(LogicException::class); $section->insertChild(0, Block::create('divi/text')); } public function testRemoveChildRefusesOnAnOpaqueBlock(): void { $document = (new Parser())->parse( '' ); $section = $document->children()[0]; $row = $section->children()[0]; self::assertTrue($section->isOpaque()); $this->expectException(LogicException::class); $section->removeChild($row); } public function testAppendRefusesOnAVoidBlock(): void { $void = Block::parsed('divi/image', [], '', true, false); $this->expectException(LogicException::class); $void->append('text'); } }