Exemplo n.º 1
0
 /**
  * Test if the the application is a virtual host.
  *
  * @return void
  */
 public function testIsVhostOf()
 {
     // create an array with the methods to mock
     $methodsToMock = array('getName', 'getAppBase', 'match');
     // create a mock for a virtual host
     $mockVirtualHost = $this->getMock('TechDivision\\Application\\Interfaces\\VirtualHostInterface', $methodsToMock);
     $mockVirtualHost->expects($this->any())->method('getName')->will($this->returnValue(ApplicationTest::SERVER_NAME));
     // add the virtual host mock
     $this->application->addVirtualHost($mockVirtualHost);
     // check if we're a virtual host of
     $this->assertTrue($this->application->isVHostOf(ApplicationTest::SERVER_NAME));
 }