/** * Adds the given classes to attributes * * @param array $classes * @return $this * @static */ public static function addClass($classes) { //Method inherited from \Bootstrapper\RenderedObject return \Bootstrapper\Accordion::addClass($classes); }
public function testWeCanAddAttributesToThePanels() { $accordion = Accordion::create('test') ->withContents( array( array( 'First', 'Contents of first', $this->testAttributes ), array( 'Second', 'Contents of second' ) ) ); $matcher = $this->getMatcher(); $matcher['child']['attributes'] = array( 'class' => 'panel panel-default foo', 'data-foo' => 'bar' ); $this->assertHtml($matcher, $accordion); }