public function testSetStyle() { $tag = new Tag('p', 'content text', ['style' => 'height:auto;font-size:small;']); $tag->setStyle('width', '100%', 'background:gray')->setStyle(['font-weight' => 'bold', 'color:black'])->removeStyle('background'); $expectedArray = ['height' => 'auto', 'font-size' => 'small', 'width' => '100%', 'font-weight' => 'bold', 'color' => 'black']; $expectedString = '<p style="height:auto;font-size:small;width:100%;font-weight:bold;color:black">content text</p>'; $this->assertEquals($expectedArray, $tag->getStyle()); $this->assertEquals($expectedString, $tag->render()); }