public function isLongNamePreferred() { if (null === $this->longNamePreferred) { // If no preference is set, prefer the short name (if one is set) return null === $this->shortName; } return $this->longNamePreferred; }
public function testSetShortNameToNullSetsLongNameToBePreferred() { $this->config->setShortName('d'); $this->config->setPreferShortName(); $this->config->setShortName(null); $this->assertTrue($this->config->isLongNamePreferred()); $this->assertFalse($this->config->isShortNamePreferred()); }