/**
  * 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 setLabel($label)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setLabel', array($label));
     return parent::setLabel($label);
 }