/** * @depends testAddGetInlineScriptContent * @return null */ public function testGetInlineScriptContentString() { $script = $this->head->getInlineScriptTag(); $sep = $script->getContentSeparator(); $block1 = 'alert("i am block 1");'; $block2 = 'var myvar="blah";'; $block3 = 'var myfun=function(){alert("my funct");};'; $this->assertEquals('', $this->head->getInlineScriptContentString()); $this->head->addInlineScriptContent($block1); $this->assertEquals($block1, $this->head->getInlineScriptContentString()); $this->head->addInlineScriptContent($block2); $this->assertEquals("{$block1}{$sep}{$block2}", $this->head->getInlineScriptContentString()); $this->head->addInlineScriptContent($block3); $this->assertEquals("{$block1}{$sep}{$block2}{$sep}{$block3}", $this->head->getInlineScriptContentString()); }