Carew\Tests\ProcessorTest::testProcessDocuments PHP Method

testProcessDocuments() public method

    public function testProcessDocuments()
    {
        $documents = array(new Document(), new Document());
        $i = 0;
        $this->eventDispatcher->addListener(Events::DOCUMENTS, function () use(&$i) {
            ++$i;
        });
        $documents = $this->processor->processDocuments($documents, new Globals());
        $this->assertSame(1, $i);
        $this->assertCount(2, $documents);
    }