public function testProcessDocument() { $i = 0; $this->eventDispatcher->addListener(Events::DOCUMENT_BODY, function () use(&$i) { ++$i; }); $this->processor->processDocument(new Document()); $this->assertSame(1, $i); }