Esempio n. 1
0
 /**
  * @covers PHP\BitTorrent\Torrent::setInfo
  * @covers PHP\BitTorrent\Torrent::getSize
  * @covers PHP\BitTorrent\Torrent::add
  */
 public function testGetSizeWhenInfoBlockHasSeveralFiles()
 {
     $files = array(array('length' => 12, 'path' => array('path', 'file.php')), array('length' => 32, 'path' => array('path2', 'file2.php')), array('length' => 123, 'path' => array('file.php')));
     $info = array('files' => $files);
     $this->torrent->setInfo($info);
     $this->assertEquals(167, $this->torrent->getSize());
 }