init() public méthode

init the class
Since: 2.6.0
public init ( array $optionArray = [] )
$optionArray array options of the breadcrumb
Exemple #1
0
 /**
  * breadcrumb
  *
  * @since 2.3.0
  *
  * @return string
  */
 public static function breadcrumb()
 {
     $breadcrumb = new Breadcrumb(Registry::getInstance(), Language::getInstance());
     $breadcrumb->init();
     return $breadcrumb->render();
 }
 /**
  * testRender
  *
  * @since 2.1.0
  *
  * @param array $registryArray
  * @param string $expect
  *
  * @dataProvider providerRender
  */
 public function testRender($registryArray = [], $expect = null)
 {
     /* setup */
     $this->_registry->init($registryArray);
     $breadcrumb = new Breadcrumb($this->_registry, $this->_language);
     $breadcrumb->init();
     /* actual */
     $actual = $breadcrumb;
     /* compare */
     $this->assertEquals($expect, $actual);
 }