/** * @test */ public function getReferenceParts() { $section = new Section('Styleguide 1'); $this->assertEquals(array(1), $section->getReferenceParts()); $section = new Section('Styleguide 1.1'); $this->assertEquals(array(1, 1), $section->getReferenceParts()); $section = new Section('Styleguide 1.0.0.1'); $this->assertEquals(array(1, 0, 0, 1), $section->getReferenceParts()); $section = new Section('Styleguide 1.0.0.1.'); $this->assertEquals(array(1, 0, 0, 1), $section->getReferenceParts()); $section = new Section('Styleguide Forms'); $this->assertEquals(array('Forms'), $section->getReferenceParts()); $section = new Section('Styleguide Forms.Checkboxes'); $this->assertEquals(array('Forms', 'Checkboxes'), $section->getReferenceParts()); $section = new Section('Styleguide Forms - Special Checkboxes'); $this->assertEquals(array('Forms', 'Special Checkboxes'), $section->getReferenceParts()); }