Example #1
0
 /**
  * @covers \Assimp\Command\Result\DumpResult::parse
  */
 public function testParse()
 {
     $testdata = array('Launching asset import ...           OK', 'Validating postprocessing flags ...  OK', 'Importing file ...                   OK', '   import took approx. 0.11398 seconds', '', 'Memory consumption: 1518080 B', 'Nodes:              1', 'Maximum depth       1', 'Meshes:             1', 'Animations:         0', 'Textures (embed.):  0', 'Materials:          1', 'Cameras:            0', 'Lights:             0', 'Vertices:           18944', 'Faces:              37884', 'Bones:              0', 'Animation Channels: 0', 'Primitive Types:    triangles', 'Average faces/mesh  37884', 'Average verts/mesh  18944', 'Minimum point      (-46.475552 -46.713150 0.000000)', 'Maximum point      (46.475552 46.713150 33.647507)', 'Center point       (0.000000 0.000000 16.823753)', '', 'Named Materials:', '    \'DefaultMaterial\'', '', 'Node hierarchy:', '\'<STL_BINARY>\', meshes: 1)');
     $result = $this->object->setOutput($testdata);
     $this->assertArrayHasKey('launching_asset_import', $this->object->getOutput());
     $this->assertArrayHasKey('importing_file', $this->object->getOutput());
     $this->assertArrayHasKey('import_time', $this->object->getOutput());
 }
Example #2
0
 /**
  * @covers \Assimp\Command\Result\ExtractResult::parse
  */
 public function testParse()
 {
     $testdata = array('Launching asset import ...           OK', 'Validating postprocessing flags ...  OK', 'Importing file ...                   OK', '   import took approx. 0.11398 seconds', '', 'assimp extract: Exporting 0 textures');
     $result = $this->object->setOutput($testdata);
     $this->assertArrayHasKey('launching_asset_import', $this->object->getOutput());
     $this->assertArrayHasKey('importing_file', $this->object->getOutput());
     $this->assertArrayHasKey('import_time', $this->object->getOutput());
     //$this->assertArrayHasKey('exported_textures', $this->object->getOutput());
 }
Example #3
0
 /**
  * @covers \Assimp\Command\Result\ExportResult::parse
  */
 public function testParse()
 {
     $testdata = array('assimp export: select file format: \'stl\' (Stereolithography)', 'Launching asset import ...           OK', 'Validating postprocessing flags ...  OK', 'Importing file ...                   OK', '   import took approx. 0.01051 seconds', '', 'Launching asset export ...           OK', 'Exporting file ...                   OK', '   export took approx. 0.28421 seconds', '', 'assimp export: wrote output file: binary-2.stl');
     $result = $this->object->setOutput($testdata);
     $this->assertArrayHasKey('launching_asset_import', $this->object->getOutput());
     $this->assertArrayHasKey('importing_file', $this->object->getOutput());
     $this->assertArrayHasKey('import_time', $this->object->getOutput());
     $this->assertArrayHasKey('exporting_file', $this->object->getOutput());
     $this->assertArrayHasKey('export_time', $this->object->getOutput());
     $this->assertArrayHasKey('output_file', $this->object->getOutput());
     $this->assertArrayHasKey('output_format', $this->object->getOutput());
 }
Example #4
0
 /**
  * @covers \Assimp\Command\Result\DumpResult::parse
  */
 public function testParse()
 {
     $testdata = array('Launching asset import ...           OK', 'Validating postprocessing flags ...  OK', 'Importing file ...                   OK', '   import took approx. 0.11398 seconds', '', 'assimp dump: Wrote output dump Fuss2.assbin');
     $result = $this->object->setOutput($testdata);
     $this->assertArrayHasKey('launching_asset_import', $this->object->getOutput());
     $this->assertArrayHasKey('importing_file', $this->object->getOutput());
     $this->assertArrayHasKey('import_time', $this->object->getOutput());
     $this->assertArrayHasKey('output_file', $this->object->getOutput());
 }