public function it_will_handle_delete_tag_push_event($tagHandler, PushPayload $pushPayload)
 {
     $pushPayload->isBranch()->willReturn(false);
     $pushPayload->isTag()->willReturn(true);
     $pushPayload->isCreate()->willReturn(false);
     $pushPayload->isUpdate()->willReturn(false);
     $pushPayload->isDelete()->willReturn(true);
     $tagHandler->delete($pushPayload)->willReturn(true)->shouldBeCalled();
     $this->process($pushPayload)->shouldReturn(true);
 }
Exemple #2
0
 /**
  * @dataProvider provideDeletedBranch
  *
  * @param $data
  *
  * @throws \Exception
  */
 public function testDeleteBranch($data)
 {
     $payload = new PushPayload($data);
     $this->assertTrue($payload->isBranch());
     $this->assertTrue($payload->isDelete());
     $this->assertSame(PushPayload::DELETED, $payload->getType());
     $this->assertFalse($payload->isTag());
     $this->assertFalse($payload->isCreate());
     $this->assertFalse($payload->isUpdate());
 }