Exemplo n.º 1
0
 public function testUpdateHandler()
 {
     $id = 'update_handler';
     $handler = $this->createMock('Modera\\ConfigBundle\\Config\\ValueUpdatedHandlerInterface');
     $container = $this->createMockContainer($id, $handler);
     $ce = new CE('foo_prop');
     $ce->setServerHandlerConfig(array('update_handler' => $id));
     $ce->init($container);
     $ce->setValue('foo');
     self::$em->persist($ce);
     self::$em->flush();
     $handler->expects($this->atLeastOnce())->method('onUpdate')->with($this->equalTo($ce));
     $ce->setValue('bar');
     self::$em->flush();
 }