public function testDoesSupport() { $this->calendar->setComponents(ObjectType::EVENT); $this->assertTrue($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertFalse($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertFalse($this->calendar->doesSupport(ObjectType::TODO)); $this->calendar->setComponents(ObjectType::JOURNAL); $this->assertFalse($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertTrue($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertFalse($this->calendar->doesSupport(ObjectType::TODO)); $this->calendar->setComponents(ObjectType::TODO); $this->assertFalse($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertFalse($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertTrue($this->calendar->doesSupport(ObjectType::TODO)); $this->calendar->setComponents(ObjectType::EVENT + ObjectType::JOURNAL); $this->assertTrue($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertTrue($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertFalse($this->calendar->doesSupport(ObjectType::TODO)); $this->calendar->setComponents(ObjectType::JOURNAL + ObjectType::TODO); $this->assertFalse($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertTrue($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertTrue($this->calendar->doesSupport(ObjectType::TODO)); $this->calendar->setComponents(ObjectType::EVENT + ObjectType::TODO); $this->assertTrue($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertFalse($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertTrue($this->calendar->doesSupport(ObjectType::TODO)); $this->calendar->setComponents(ObjectType::EVENT + ObjectType::JOURNAL + ObjectType::TODO); $this->assertTrue($this->calendar->doesSupport(ObjectType::EVENT)); $this->assertTrue($this->calendar->doesSupport(ObjectType::JOURNAL)); $this->assertTrue($this->calendar->doesSupport(ObjectType::TODO)); }