/** * @return FullyQualifiedClassConstantName|FullyQualifiedConstantName * The fully-qualified structural element name of this * structural element */ public function getFQSEN() : FQSEN { // Get the stored FQSEN if it exists if ($this->fqsen) { return $this->fqsen; } return FullyQualifiedConstantName::fromStringInContext($this->getName(), $this->getContext()); }
public function testFullyQualifiedConstantName() { $this->assertFQSENEqual(FullyQualifiedConstantName::make('\\Name\\Space', 'c'), '\\Name\\Space\\c'); $this->assertFQSENEqual(FullyQualifiedConstantName::make('', 'c'), '\\c'); $this->assertFQSENEqual(FullyQualifiedConstantName::make('', 'c'), '\\c'); $this->assertFQSENEqual(FullyQualifiedConstantName::fromFullyQualifiedString('\\c'), '\\c'); $this->assertFQSENEqual(FullyQualifiedConstantName::fromStringInContext('c', $this->context), '\\c'); }