/**
  * Tests that initialization from a deployment descriptor class works as expected.
  *
  * @return void
  */
 public function testFromConfiguration()
 {
     // initialize the configuration
     $node = new MessageDrivenNode();
     $node->initFromFile(__DIR__ . '/_files/dd-messagedrivenbean.xml');
     // initialize the descriptor from the nodes data
     $this->descriptor->fromConfiguration($node);
     // check that the descriptor has been initialized
     $this->assertSame($this->descriptor, $this->descriptor->fromConfiguration($node));
     $this->assertSame('ImportReceiver', $this->descriptor->getName());
     $this->assertSame('AppserverIo\\Apps\\Example\\MessageBeans\\ImportReceiver', $this->descriptor->getClassName());
     $this->assertCount(0, $this->descriptor->getEpbReferences());
     $this->assertCount(0, $this->descriptor->getResReferences());
     $this->assertCount(0, $this->descriptor->getReferences());
 }
 /**
  * Tests that initialization from an wrong deployment descriptor, e. g. a
  * message driven bean, won't work.
  *
  * @return void
  */
 public function testFromConfigurationOtherBeanType()
 {
     // initialize the configuration
     $node = new MessageDrivenNode();
     $node->initFromFile(__DIR__ . '/_files/dd-messagedrivenbean.xml');
     // check that the descriptor has not been initialized
     $this->assertNull($this->descriptor->fromConfiguration($node));
 }