Example #1
0
 public function testAddToList()
 {
     $input = new ReduceInput();
     $input->addToList(new MapEntry('a', 1));
     $this->assertEquals(1, count($input->getList()));
     $input->addToList(new MapEntry('b', 1));
     $this->assertEquals(2, count($input->getList()));
 }
Example #2
0
 public function execute(ReduceInput $input)
 {
     $this->count = count($input->getList());
     CharCounter::emit($input, $this->count);
 }