示例#1
0
 /**
  * @test
  */
 public function getReferenceTrimmedWords()
 {
     $section = new Section('Styleguide Forms.Checkboxes.');
     $this->assertEquals('Forms.Checkboxes', $section->getReference(true));
     $section = new Section('Styleguide Forms - Special Checkboxes -');
     $this->assertEquals('Forms - Special Checkboxes', $section->getReference(true));
 }
示例#2
0
 /**
  * Adds a section to the Sections collection
  *
  * @param string $comment
  * @param \splFileObject $file
  */
 protected function addSection($comment, \splFileObject $file)
 {
     $section = new Section($comment, $file);
     $this->sections[$section->getReference(true)] = $section;
     $this->sectionsSortedByReference = false;
 }