chrisyue /
php-m3u8
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 Chrisyue\PhpM3u8\Tests\Stream; |
||
| 4 | |||
| 5 | use PHPUnit\Framework\TestCase; |
||
| 6 | use Chrisyue\PhpM3u8\Stream\FileStream; |
||
| 7 | |||
| 8 | class FileStreamTest extends TestCase |
||
| 9 | { |
||
| 10 | View Code Duplication | public function testNext() |
|
|
0 ignored issues
–
show
|
|||
| 11 | { |
||
| 12 | $prophet = $this->prophesize(\SplFileObject::class); |
||
| 13 | $prophet->next()->shouldBeCalledTimes(1); |
||
| 14 | |||
| 15 | $stream = new FileStream($prophet->reveal()); |
||
| 16 | $stream->next(); |
||
| 17 | } |
||
| 18 | |||
| 19 | View Code Duplication | public function testValid() |
|
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
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. Loading history...
|
|||
| 20 | { |
||
| 21 | $prophet = $this->prophesize(\SplFileObject::class); |
||
| 22 | $prophet->valid()->shouldBeCalledTimes(1); |
||
| 23 | |||
| 24 | $stream = new FileStream($prophet->reveal()); |
||
| 25 | $stream->valid(); |
||
| 26 | } |
||
| 27 | |||
| 28 | View Code Duplication | public function testGetLine() |
|
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
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. Loading history...
|
|||
| 29 | { |
||
| 30 | $prophet = $this->prophesize(\SplFileObject::class); |
||
| 31 | $prophet->current()->shouldBeCalled(); |
||
| 32 | |||
| 33 | $stream = new FileStream($prophet->reveal()); |
||
| 34 | $stream->read(); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |
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.