Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Feb 15, 2018
1 parent 11193f2 commit 88af5cc
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/ChunkFileFactoryTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Recca0120\Upload\Tests;

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Recca0120\Upload\ChunkFileFactory;

class ChunkFileFactoryTest extends TestCase
{
protected function tearDown()
{
parent::tearDown();
m::close();
}

public function testCreate()
{
$chunkFileFactory = new ChunkFileFactory(
$files = m::mock('Recca0120\Upload\Filesystem')
);

$files->shouldReceive('mimeType')->once()->andReturn('text/plain');

$this->assertInstanceOf('Recca0120\Upload\ChunkFile', $chunkFileFactory->create('foo.php', 'foo.chunksPath', 'foo.storagePath', 'foo.token'));
}
}

0 comments on commit 88af5cc

Please sign in to comment.