assertEquals( STORAGE_PATH_RIPLOG . '/71/00/17_34.log', new File\RipLog(17, 34)->path(), 'file-riplog-17-14', ); $this->assertEquals( STORAGE_PATH_RIPLOG . '/73/16/16137_707.log', new File\RipLog(16137, 707)->path(), 'file-riplog-16137-707' ); $this->assertEquals( STORAGE_PATH_RIPLOG . '/73/16/16137_708.log', new File\RipLog(16137, 708)->path(), 'file-riplog-16137-708' ); } public function testRipLogHTMLPath(): void { $this->assertEquals( STORAGE_PATH_RIPLOGHTML . '/72/00/27_44.html', new File\RipLogHTML(27, 44)->path(), 'file-html-27-44' ); $this->assertEquals( STORAGE_PATH_RIPLOGHTML . '/73/16/26137_807.html', new File\RipLogHTML(26137, 807)->path(), 'file-html-26137-807' ); $this->assertEquals( STORAGE_PATH_RIPLOGHTML . '/73/16/26137_808.html', new File\RipLogHTML(26137, 808)->path(), 'file-html-26137-808' ); } public function testTorrentPath(): void { $this->assertEquals( STORAGE_PATH_TORRENT . '/10/00/1.torrent', new File\Torrent(1)->path(), 'file-torrent-00001' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/01/00/10.torrent', new File\Torrent(10)->path(), 'file-torrent-00010' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/00/10/100.torrent', new File\Torrent(100)->path(), 'file-torrent-00100' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/00/01/1000.torrent', new File\Torrent(1000)->path(), 'file-torrent-01000' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/00/00/10000.torrent', new File\Torrent(10000)->path(), 'file-torrent-10000' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/10/00/10001.torrent', new File\Torrent(10001)->path(), 'file-torrent-10001' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/20/00/10002.torrent', new File\Torrent(10002)->path(), 'file-torrent-10002' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/43/21/1234.torrent', new File\Torrent(1234)->path(), 'file-torrent-1234' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/53/21/1235.torrent', new File\Torrent(1235)->path(), 'file-torrent-1235' ); $this->assertEquals( STORAGE_PATH_TORRENT . '/43/21/81234.torrent', new File\Torrent(81234)->path(), 'file-torrent-81234' ); } public function testFileRipLogHTML(): void { $file = new File\RipLogHTML(2651337, 306); $this->assertFalse($file->exists(), 'file-h-not-exists'); $this->assertFalse($file->get(), 'file-h-not-get'); $this->assertEquals(0, $file->remove(), 'file-h-not-remove'); $text = "