public function testGetValue() { $handlerServiceId = 'foo_handler'; $expectedValue = 'jfksdljfdks'; $handler = $this->createMock('Modera\\ConfigBundle\\Config\\HandlerInterface'); $handler->expects($this->atLeastOnce())->method('getValue')->with($this->isInstanceOf(CE::clazz()))->will($this->returnValue($expectedValue)); $container = $this->createMockContainer($handlerServiceId, $handler); $ce = new CE('bar_prop'); $ce->setServerHandlerConfig(array('handler' => $handlerServiceId)); $ce->init($container); $ce->setDenormalizedValue('foo_val'); $this->assertEquals($expectedValue, $ce->getValue()); }