getTmpDir() public method

Returns the servers tmp directory, append with the passed directory.
public getTmpDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the temporary directory for
$relativePathToAppend string A relative path to append
return string
 /**
  * Tests if getting just the tmp directory works
  *
  * @return null
  */
 public function testGetTmpDirNothingToAppend()
 {
     $mockHost = $this->getMockBuilder('\\AppserverIo\\Appserver\\Core\\Api\\Node\\HostNodeInterface')->setMethods(get_class_methods('\\AppserverIo\\Appserver\\Core\\Api\\Node\\HostNodeInterface'))->getMock();
     $mockHost->expects($this->once())->method('getTmpBase')->willReturn('var/tmp');
     $mockContainer = $this->getMockBuilder('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ContainerNodeInterface')->setMethods(get_class_methods('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ContainerNodeInterface'))->getMock();
     $mockContainer->expects($this->once())->method('getHost')->willReturn($mockHost);
     $tmpDir = $this->service->getTmpDir($mockContainer);
     $this->assertEquals('/opt/appserver/var/tmp', $tmpDir);
     $this->assertNotEquals('/opt/appserver/var/tmp/test/directory', $tmpDir);
 }
 /**
  * Tests if getting just the tmp directory works
  *
  * @return null
  */
 public function testGetTmpDirNothingToAppend()
 {
     $tmpDir = $this->service->getTmpDir();
     $this->assertEquals('/opt/appserver/var/tmp', $tmpDir);
     $this->assertNotEquals('/opt/appserver/var/tmp/test/directory', $tmpDir);
 }