AppserverIo\Appserver\Core\Api\AbstractServiceTest::testGetDeployDirDirectoryAppended PHP Method

testGetDeployDirDirectoryAppended() public method

Tests if returning the deploy dir + appendage works
    public function testGetDeployDirDirectoryAppended()
    {
        $mockHost = $this->getMockBuilder('\\AppserverIo\\Appserver\\Core\\Api\\Node\\HostNodeInterface')->setMethods(get_class_methods('\\AppserverIo\\Appserver\\Core\\Api\\Node\\HostNodeInterface'))->getMock();
        $mockHost->expects($this->exactly(2))->method('getDeployBase')->willReturn('deploy');
        $mockContainer = $this->getMockBuilder('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ContainerNodeInterface')->setMethods(get_class_methods('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ContainerNodeInterface'))->getMock();
        $mockContainer->expects($this->exactly(2))->method('getHost')->willReturn($mockHost);
        $appendedDirectory = '/test/directory';
        $result = $this->service->getDeployDir($mockContainer, $appendedDirectory);
        $this->assertEquals($this->service->getDeployDir($mockContainer) . $appendedDirectory, $result);
    }