1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-17 12:50:08 -07:00
PrintABrick/tests/Service/Stl/StlFixer/StlFixerTest.php
2017-06-07 17:22:10 +02:00

39 lines
991 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\BaseTest;
class StlFixer extends BaseTest
{
/** @var StlFixerService */
protected $stlFixer;
protected $input;
public function setUp()
{
$this->stlFixer = new StlFixerService($this->getParameter('admesh_bin'));
$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'));
}
}