Sonata\Component\Currency\Currency::__toString PHP Method

__toString() public method

protected $symbol;
public __toString ( )
    public function __toString()
    {
        return $this->getLabel();
    }

Usage Example

Exemplo n.º 1
0
 public function testGettersSetters()
 {
     $currency = new Currency();
     $currency->setLabel('EUR');
     $this->assertEquals('EUR', $currency->getLabel());
     $this->assertEquals('EUR', $currency->__toString());
 }