public function testConvertStr() { // Note: This convert is entirely "in PHP" so go ahead and test out the full process without stubbing out cmd() $render3d = new Render3d(); $name = 'example'; $render3d->workingDir($this->workingDir); $render3d->file($name); $render3d->fileType('stl'); copy($this->testFilesDir . $name . '.stl', $this->workingDir . $name . '.stl'); $converter = new StlPov($render3d); $currentDir = getcwd(); chdir($this->workingDir); $converter->convert(true); chdir($currentDir); // Make sure it updated the file type when successful $this->assertEquals('pov', $render3d->fileType(), 'Ensure that the file type was updated when convert successful'); $this->assertEquals($name, $render3d->file(), 'Ensure that the filename stayed the same for consistency'); $this->assertFileExists($this->workingDir . $name . '.pov', 'Ensure that the pov file was created'); }
public function testOptions() { $defaultOptions = $this->render3d->options(); $this->render3d->options(['param1' => 'val1']); $this->assertSame(array_merge($defaultOptions, ['param1' => 'val1']), $this->render3d->options()); }