Skip to content

Commit 88af5cc

Browse files
committed
add test
1 parent 11193f2 commit 88af5cc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/ChunkFileFactoryTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Recca0120\Upload\Tests;
4+
5+
use Mockery as m;
6+
use PHPUnit\Framework\TestCase;
7+
use Recca0120\Upload\ChunkFileFactory;
8+
9+
class ChunkFileFactoryTest extends TestCase
10+
{
11+
protected function tearDown()
12+
{
13+
parent::tearDown();
14+
m::close();
15+
}
16+
17+
public function testCreate()
18+
{
19+
$chunkFileFactory = new ChunkFileFactory(
20+
$files = m::mock('Recca0120\Upload\Filesystem')
21+
);
22+
23+
$files->shouldReceive('mimeType')->once()->andReturn('text/plain');
24+
25+
$this->assertInstanceOf('Recca0120\Upload\ChunkFile', $chunkFileFactory->create('foo.php', 'foo.chunksPath', 'foo.storagePath', 'foo.token'));
26+
}
27+
}

0 commit comments

Comments
 (0)