Ejemplo n.º 1
0
 /**
  * @depends				testInitialState
  * @return				null
  */
 public function testAddGetInlineStyleContent()
 {
     $style = $this->head->getInlineStyleTag();
     $block1 = 'p{color:red}';
     $block2 = 'h1{color:blue};';
     $this->assertEquals(0, $style->getContentCount());
     $this->assertEquals(array(), $this->head->getInlineStyleContent());
     $this->assertFalse($this->head->getInlineStyleContent(0));
     $this->assertFalse($this->head->getInlineStyleContent(1));
     $this->assertSame($this->head, $this->head->addInlineStyleContent($block1));
     $expected = array($block1);
     $this->assertEquals(1, $style->getContentCount());
     $this->assertEquals($block1, $this->head->getInlineStyleContent(0));
     $this->assertEquals($expected, $this->head->getInlineStyleContent());
     $this->assertSame($this->head, $this->head->addInlineStyleContent($block2));
     $expected = array($block1, $block2);
     $this->assertEquals(2, $style->getContentCount());
     $this->assertEquals($block1, $this->head->getInlineStyleContent(0));
     $this->assertEquals($block2, $this->head->getInlineStyleContent(1));
     $this->assertEquals($expected, $this->head->getInlineStyleContent());
 }