public function output()
 {
     $data['total'] = 0;
     foreach ($this->getDivision() as $div) {
         $name = new ProductDetail($div);
         $link = new UrlRender($name->productLink());
         $file = $link->open();
         $description = new productDesc($file);
         $items = array('title' => $name->productTitle(), 'unit_price' => $name->productPrice(), 'size' => $name->linkSize(strlen($file)), 'description' => $description->getDesc());
         $data['result'][] = $items;
         $data['total'] += $items['unit_price'];
     }
     return $data;
 }
 public function setUp()
 {
     $file = realpath(__DIR__ . '/tests/subpage.html');
     $reader = new UrlRender('file://' . $file);
     $this->html = new ProductDesc($reader->open());
 }
 public function setUp()
 {
     $file = realpath(__DIR__ . '/tests/mainpage.html');
     $reader = new UrlRender('file://' . $file);
     $this->product = new ProductDetail($reader->open());
 }