Exemplo n.º 1
0
 public function testSave()
 {
     $config = array('username' => 'tic', 'password' => 'toc');
     $this->repository->expects($this->once())->method('findBy')->with($this->equalTo(array('type' => 'reuters', 'config' => $config)));
     $this->odm->expects($this->once())->method('persist')->with($this->isInstanceOf('Newscoop\\News\\ReutersFeed'));
     $this->odm->expects($this->once())->method('flush');
     $feed = $this->service->save(array('type' => 'reuters', 'config' => $config));
     $this->assertInstanceOf('Newscoop\\News\\ReutersFeed', $feed);
 }