/** * @covers \Assimp\Command\Result\VersionResult::parse */ public function testParse() { $this->object->setOutput(array('Version 3.0--shared -st (SVNREV 1270)')); $this->assertCount(2, $this->object->getOutput()); $this->assertEquals('3.0', $this->object->getOutputLine('version')); $this->assertEquals('1270', $this->object->getOutputLine('svnrev')); }
/** * @covers Assimp\Command\Result::offsetGet * @covers Assimp\Command\Result::offsetSet * @covers Assimp\Command\Result::offsetExists * @covers Assimp\Command\Result::offsetUnset * @covers Assimp\Command\Result::count */ public function testArrayAccessCountable() { $this->object['line1'] = 'line-1'; $this->object['line2'] = 'line-2'; $this->assertCount(2, $this->object->getOutput()); $this->assertEquals('line-1', $this->object['line1']); $this->assertEquals('line-2', $this->object['line2']); $this->assertArrayHasKey('line1', $this->object); $this->assertArrayHasKey('line2', $this->object); unset($this->object['line2']); $this->assertCount(1, $this->object); $this->assertArrayNotHasKey('line2', $this->object); }