public function it_can_delete_a_token(Token $token, \PDOStatement $statement)
 {
     $token->getUuid()->willReturn($uuid = Uuid::uuid4());
     $this->pdo->prepare(new Argument\Token\StringContainsToken('DELETE FROM tokens'))->willReturn($statement);
     $statement->execute(['token_uuid' => $uuid->getBytes()])->shouldBeCalled();
     $this->delete($token);
 }
Exemple #2
0
 public function delete(Token $token)
 {
     $this->executeSql('
         DELETE FROM tokens WHERE token_uuid = :token_uuid
     ', ['token_uuid' => $token->getUuid()->getBytes()]);
 }