These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\MediaBundle\Tests\Helper\RemoteAudio; |
||
4 | |||
5 | use Kunstmaan\MediaBundle\Entity\Media; |
||
6 | use Kunstmaan\MediaBundle\Helper\RemoteAudio\RemoteAudioHandler; |
||
7 | use Kunstmaan\MediaBundle\Helper\RemoteAudio\RemoteAudioHelper; |
||
8 | use PHPUnit\Framework\TestCase; |
||
9 | |||
10 | View Code Duplication | class RemoteAudioHelperTest extends TestCase |
|
0 ignored issues
–
show
|
|||
11 | { |
||
12 | /** |
||
13 | * @var Media |
||
14 | */ |
||
15 | protected $media; |
||
16 | |||
17 | /** |
||
18 | * @var RemoteAudioHelper |
||
19 | */ |
||
20 | protected $object; |
||
21 | |||
22 | protected function setUp() |
||
23 | { |
||
24 | $this->media = new Media(); |
||
25 | $this->object = new RemoteAudioHelper($this->media); |
||
26 | } |
||
27 | |||
28 | public function testGetMedia() |
||
29 | { |
||
30 | $this->assertEquals(RemoteAudioHandler::CONTENT_TYPE, $this->object->getMedia()->getContentType()); |
||
31 | } |
||
32 | } |
||
33 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.