/**
  * @test
  */
 public function checkReturnsFalseWhenKeyIsDisabled()
 {
     $key = new ApiKey();
     $key->disable();
     $repo = $this->prophesize(EntityRepository::class);
     $repo->findOneBy(['key' => '12345'])->willReturn($key)->shouldBeCalledTimes(1);
     $this->em->getRepository(ApiKey::class)->willReturn($repo->reveal());
     $this->assertFalse($this->service->check('12345'));
 }