AppserverIo\Appserver\Core\Api\AbstractServiceTest::testGetWebappsDirNothingToAppend PHP Méthode

testGetWebappsDirNothingToAppend() public méthode

Tests if getting just the webapps directory works
public testGetWebappsDirNothingToAppend ( ) : null
Résultat null
    public function testGetWebappsDirNothingToAppend()
    {
        $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('getAppBase')->willReturn('webapps');
        $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);
        $webappsDir = $this->service->getWebappsDir($mockContainer);
        $this->assertEquals('/opt/appserver/webapps', $webappsDir);
        $this->assertNotEquals('/opt/appserver/webapps/test/directory', $webappsDir);
    }