/**
  * Test for __toString method
  */
 public function testToString()
 {
     $newCode = 'toStringCode';
     $expectedCode = '[' . $newCode . ']';
     $this->type->setCode($newCode);
     $this->assertEquals($expectedCode, $this->type->__toString());
     $newLabel = 'toStringLabel';
     $this->assertEntity($this->type->setLocale('en_US'));
     $this->assertEntity($this->type->setLabel($newLabel));
     $this->assertEquals($newLabel, $this->type->__toString());
     $this->type->setLocale('fr_FR');
     $this->assertEquals($expectedCode, $this->type->__toString());
     $this->type->setLabel('');
     $this->assertEquals($expectedCode, $this->type->__toString());
 }
 /**
  * {@inheritDoc}
  */
 public function __toString()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, '__toString', array());
     return parent::__toString();
 }