100, 'height' => 200/mm2pt(1)), array('top'=>0, 'bottom'=>0, 'left'=>0, 'right'=>0)); $tree = $this->runPipeline('
SMALL SMALL SMALL SMALL SMALL SMALL SMALL SMALL SMALL SMALL
LARGE LARGE LARGE LARGE LARGE LARGE LARGE
', $media); $small = $tree->get_element_by_id('small'); $font_size =& $small->getCSSProperty(CSS_FONT_SIZE); $this->assertEqual($font_size->getPoints(), 20); $large = $tree->get_element_by_id('large'); $font_size =& $large->getCSSProperty(CSS_FONT_SIZE); $this->assertEqual($font_size->getPoints(), 30); $locations = PageBreakLocator::_getBreakLocations($tree); $this->assertEqual(count($locations), 5); $page_heights = PageBreakLocator::getPages($tree, mm2pt($media->real_height()), mm2pt($media->height() - $media->margins['top'])); $this->assertEqual(count($page_heights), 2, sprintf("Two pages expected, got %s", count($page_heights))); $this->assertEqual($page_heights[0], pt2pt(180)); } } ?>