Fix PATCH method

The PATCH method for the entry should only update what user sent to us and not the whole entry as it was before.
Also, sending tags when patching an entry will now remove all current tags & assocatied new ones.
This commit is contained in:
Jeremy Benoist
2017-06-30 16:54:26 +02:00
parent 71e1cbc8eb
commit a05b61159e
5 changed files with 270 additions and 121 deletions

View File

@ -221,12 +221,9 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
->method('tag');
$validator = $this->getValidator();
$validator->expects($this->exactly(2))
$validator->expects($this->once())
->method('validate')
->will($this->onConsecutiveCalls(
new ConstraintViolationList([new ConstraintViolation('oops', 'oops', [], 'oops', 'language', 'dontexist')]),
new ConstraintViolationList()
));
->willReturn(new ConstraintViolationList([new ConstraintViolation('oops', 'oops', [], 'oops', 'language', 'dontexist')]));
$graby = $this->getMockBuilder('Graby\Graby')
->setMethods(['fetchContent'])