Exemplo n.º 1
0
 private function aggregateWords(Chan $words, $numWords)
 {
     $wordsArr = [];
     for ($i = 0; $i < $numWords; $i++) {
         $wordsArr = array_merge($wordsArr, $words->get());
     }
     return $wordsArr;
 }
Exemplo n.º 2
0
 public function testChanChan()
 {
     // given
     $entity = new Chan(null, $this->driver, $this->mapper);
     $ch = new Chan(Chan::CLASSNAME, $this->driver, $this->mapper);
     // when
     $ch->add($entity);
     $found = $ch->get();
     // then
     $this->assertEquals($entity, $found, 'chan get should return same entity that was added');
 }