protected function setUp()
{
$this->currency = $this->getMock('Sonata\\Component\\Currency\\CurrencyInterface');
$this->currency->expects($this->any())->method('getLabel')->will($this->returnValue('EUR'));
$currencyManager = $this->getMock('Sonata\\Component\\Currency\\CurrencyManagerInterface');
$currencyManager->expects($this->any())->method('findOneByLabel')->will($this->returnValue($this->currency));
$this->object = new CurrencyDetector('EUR', $currencyManager);
}