/**
  * @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());
 }
Exemple #2
0
 public function testShouldGetSize()
 {
     $this->assertSame(1181818, $this->torrent->getSize());
 }