1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-19 05:30:08 -07:00
PrintABrick/tests/Service/Stl/StlFixer/StlFixerTest.php
2017-05-24 16:21:35 +02:00

39 lines
976 B
PHP

<?php
namespace Tests\AppBundle\Service\Stl;
use AppBundle\Service\Stl\StlConverterService;
use AppBundle\Service\Stl\StlFixerService;
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use League\Flysystem\FilesystemInterface;
use org\bovigo\vfs\vfsStreamDirectory;
use org\bovigo\vfs\vfsStreamWrapper;
use PHPUnit\Framework\TestCase;
use Tests\AppBundle\Service\BaseTest;
class StlFixer extends BaseTest
{
/** @var StlFixerService */
protected $stlFixer;
protected $input;
public function setUp()
{
$this->stlFixer = $this->get('service.stl.fixer');
$this->input = __DIR__.'/fixtures/ascii.stl';
}
public function tearDown()
{
$this->filesystem->delete('output.stl');
}
public function testFixing()
{
$this->stlFixer->fix($this->input,$this->filesystem->getAdapter()->getPathPrefix().'/output.stl');
$this->assertTrue($this->filesystem->has('output.stl'));
}
}