示例#1
0
 public function testDelete()
 {
     $entity = $this->subject->create('type');
     $this->objectManager->expects($this->once())->method('remove')->with($entity);
     $this->objectManager->expects($this->once())->method('flush');
     $this->subject->delete($entity);
 }
示例#2
0
 public function testFindByWithStatus()
 {
     $job = $this->subject->create('JobType', null, new Schedule('Type', 'Expression'));
     $job->setStatus(Status::REQUESTED());
     $this->subject->save($job);
     $this->assertCount(1, $this->subject->findBy(['status' => Status::REQUESTED()]));
     $this->assertEmpty($this->subject->findBy(['status' => Status::PROCESSED()]));
 }