public function testSetOrganizationForPublic() { $obj = new SystemCalendar(); $obj->setPublic(true); $this->assertTrue($obj->isPublic()); $this->assertNull($obj->getOrganization()); $obj->setOrganization(new Organization()); $this->assertNull($obj->getOrganization()); }
/** * Test update of public calendar */ public function testPreUpdatePublicCalendar() { $entity = new SystemCalendar(); $entity->setOrganization(new Organization()); $this->assertNotNull($entity->getOrganization()); $changeSet = []; $args = new PreUpdateEventArgs($entity, $this->em, $changeSet); $entity->setPublic(true); $this->listener->preUpdate($args); $this->assertNull($entity->getOrganization()); }