public function testLocaleIsPassedToValueTransformer_setLocaleCalledAfter() { $transformer = $this->getMock('Symfony\\Component\\Form\\ValueTransformer\\ValueTransformerInterface'); $transformer->expects($this->exactly(2))->method('setLocale'); // we can't test the params cause they differ :( $field = new TestField('title', array('value_transformer' => $transformer)); $field->setLocale('de_DE'); }