public function testAddingErrorToNonEditableSystemEntity() { $this->entity->setIsSystem(true); $this->entity->setIsEditable(false); $this->form->expects($this->once())->method('setData')->with($this->entity); $this->form->expects($this->once())->method('addError'); $this->request->setMethod('POST'); $this->translator->expects($this->once())->method('trans'); $this->assertFalse($this->handler->process($this->entity)); }
public function testCloneForSystemNonEditableTemplate() { $emailTemplate = new EmailTemplate(); $emailTemplate->setIsSystem(true); $emailTemplate->setIsEditable(false); $this->assertTrue($emailTemplate->getIsSystem()); $this->assertFalse($emailTemplate->getIsEditable()); $clone = clone $emailTemplate; $this->assertFalse($clone->getIsSystem()); $this->assertTrue($clone->getIsEditable()); }