Ejemplo n.º 1
0
 /**
  * Checks if the resource identifier will be initialized propertly
  * from a URL with global scope and remote interface.
  *
  * @return void
  */
 public function testWithDefaultPropertiesPopulatedWithGlobalScopeAndRemoteInterface()
 {
     // create default properties
     $defaultProperties = new Properties();
     $defaultProperties->setProperty('indexFile', InitialContextTest::INDEX_FILE);
     $defaultProperties->setProperty('contextName', InitialContextTest::CONTEXT_NAME);
     $defaultProperties->setProperty('transport', InitialContextTest::TRANSPORT);
     // create the initial context initialized with the default properties
     $this->initialContext->injectProperties($defaultProperties);
     // populate the identifier with the data of the passed URL
     $resourceIdentifier = $this->initialContext->prepareResourceIdentifier(InitialContextTest::IDENTIFIER_GLOBAL_REMOTE);
     // check the data from the resource identifier
     $this->assertSame(InitialContextTest::INDEX_FILE, $resourceIdentifier->getIndexFile());
     $this->assertSame(InitialContextTest::CLASS_NAME, $resourceIdentifier->getClassName());
     $this->assertSame(InitialContextTest::CONTEXT_NAME, $resourceIdentifier->getContextName());
     $this->assertSame(InitialContextTest::TRANSPORT, $resourceIdentifier->getTransport());
     $this->assertSame(EnterpriseBeanResourceIdentifier::REMOTE_INTERFACE, $resourceIdentifier->getInterface());
 }