public function testMultipleBuildWithReset()
 {
     $this->eventBuilder->setPrefixJavascriptVariable('foo')->setInstance('instance')->setEventName('event_name')->setHandle('handle')->setCapture(true);
     $event1 = $this->eventBuilder->build();
     $this->eventBuilder->reset();
     $event2 = $this->eventBuilder->build();
     $this->assertNotSame($event1, $event2);
     $this->assertSame('foo', substr($event1->getJavascriptVariable(), 0, 3));
     $this->assertSame('instance', $event1->getInstance());
     $this->assertSame('event_name', $event1->getEventName());
     $this->assertSame('handle', $event1->getHandle());
     $this->assertTrue($event1->isCapture());
     $this->assertSame('event_', substr($event2->getJavascriptVariable(), 0, 6));
     $this->assertNull($event2->getInstance());
     $this->assertNull($event2->getEventName());
     $this->assertNull($event2->getHandle());
     $this->assertFalse($event2->isCapture());
 }
 public function testMultipleBuildWithReset()
 {
     $domEvents = array($this->eventBuilder->build());
     $domEventsOnce = array($this->eventBuilder->build());
     $events = array($this->eventBuilder->build());
     $eventsOnce = array($this->eventBuilder->build());
     $this->eventManagerBuilder->setDomEvents($domEvents)->setDomEventsOnce($domEventsOnce)->setEvents($events)->setEventsOnce($eventsOnce);
     $eventManager1 = $this->eventManagerBuilder->build();
     $this->eventManagerBuilder->reset();
     $eventManager2 = $this->eventManagerBuilder->build();
     $this->assertNotSame($eventManager1, $eventManager2);
     $this->assertSame($domEvents, $eventManager1->getDomEvents());
     $this->assertSame($domEventsOnce, $eventManager1->getDomEventsOnce());
     $this->assertSame($events, $eventManager1->getEvents());
     $this->assertSame($eventsOnce, $eventManager1->getEventsOnce());
     $this->assertEmpty($eventManager2->getDomEvents());
     $this->assertEmpty($eventManager2->getDomEventsOnce());
     $this->assertEmpty($eventManager2->getEvents());
     $this->assertEmpty($eventManager2->getEventsOnce());
 }