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); }
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()])); }