Example #1
0
 /**
  * Tests if we will run through the deploy process without an error
  *
  * @return null
  */
 public function testDeploy()
 {
     $mockExtractor = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ExtractorInterface');
     $mockExtractor->expects($this->once())->method('flagArchive');
     $this->appService->injectExtractor($mockExtractor);
     $this->appService->deploy($appNode = new AppNode(__METHOD__, '/opt/appserver/targetwebapp'));
 }
 /**
  * Tests if we will run through the deploy process without an error
  *
  * @return null
  */
 public function testDeploy()
 {
     $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('getDeployBase')->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);
     $mockExtractor = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ExtractorInterface');
     $mockExtractor->expects($this->once())->method('flagArchive');
     $this->appService->injectExtractor($mockExtractor);
     $this->appService->deploy($mockContainer, new AppNode(__METHOD__, '/opt/appserver/targetwebapp'));
 }