getInfo() public method

Get all applicable ID3 info from the file.
public getInfo ( ) : array | void
return array | void
示例#1
0
文件: MediaTest.php 项目: phanan/koel
 public function testHtmlEntitiesInTags()
 {
     $getID3 = m::mock(getID3::class, ['analyze' => ['tags' => ['id3v2' => ['title' => ['水谷広実'], 'album' => ['小岩井こ Random'], 'artist' => ['佐倉綾音 Unknown']]], 'encoding' => 'UTF-8', 'playtime_seconds' => 100]]);
     $file = new File(dirname(__FILE__) . '/songs/blank.mp3', $getID3);
     $info = $file->getInfo();
     $this->assertEquals('佐倉綾音 Unknown', $info['artist']);
     $this->assertEquals('小岩井こ Random', $info['album']);
     $this->assertEquals('水谷広実', $info['title']);
 }