1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Stinger Media Parser package. |
5
|
|
|
* |
6
|
|
|
* (c) Oliver Kotte <[email protected]> |
7
|
|
|
* (c) Florian Meyer <[email protected]> |
8
|
|
|
* |
9
|
|
|
* For the full copyright and license information, please view the LICENSE |
10
|
|
|
* file that was distributed with this source code. |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
namespace StingerSoft\MediaParsingBundle\Tests\Parser\Information; |
14
|
|
|
|
15
|
|
|
use StingerSoft\MediaParsingBundle\Parser\Information\AbstractMediaInformation; |
16
|
|
|
|
17
|
|
|
class AbstractMediaInformationTest extends \PHPUnit_Framework_TestCase { |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var AbstractMediaInformation |
21
|
|
|
*/ |
22
|
|
|
protected $object; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Sets up the fixture, for example, opens a network connection. |
26
|
|
|
* This method is called before a test is executed. |
27
|
|
|
*/ |
28
|
|
|
protected function setUp(){ |
29
|
|
|
$this->object = $this->getMockForAbstractClass('StingerSoft\MediaParsingBundle\Parser\Information\AbstractMediaInformation'); |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Tears down the fixture, for example, closes a network connection. |
34
|
|
|
* This method is called after a test is executed. |
35
|
|
|
*/ |
36
|
|
|
protected function tearDown(){ |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::setTitle |
41
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::getTitle |
42
|
|
|
*/ |
43
|
|
|
public function testTitle(){ |
44
|
|
|
$this->object->setTitle('Title'); |
45
|
|
|
$this->assertEquals('Title', $this->object->getTitle()); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::setMimeType |
50
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::getMimeType |
51
|
|
|
*/ |
52
|
|
|
public function testMimeType(){ |
53
|
|
|
$this->object->setMimeType('MimeType'); |
54
|
|
|
$this->assertEquals('MimeType', $this->object->getMimeType()); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::setFilePath |
59
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::getFilePath |
60
|
|
|
*/ |
61
|
|
|
public function testFilePath(){ |
62
|
|
|
$this->object->setFilePath('FilePath'); |
63
|
|
|
$this->assertEquals('FilePath', $this->object->getFilePath()); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::setFileSize |
68
|
|
|
* @covers StingerSoft\MediaParsingBundle\Parser\Information\SongInformation::getFileSize |
69
|
|
|
*/ |
70
|
|
|
public function testFileSize(){ |
71
|
|
|
$this->object->setFileSize('FileSize'); |
72
|
|
|
$this->assertEquals('FileSize', $this->object->getFileSize()); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
|
76
|
|
|
} |