ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PatchEventTest.php
Go to the documentation of this file.
1<?php
2
9
12use Composer\Package\PackageInterface;
13
15
21 public function testGetters($event_name, PackageInterface $package, $url, $description) {
22 $patch_event = new PatchEvent($event_name, $package, $url, $description);
23 $this->assertEquals($event_name, $patch_event->getName());
24 $this->assertEquals($package, $patch_event->getPackage());
25 $this->assertEquals($url, $patch_event->getUrl());
26 $this->assertEquals($description, $patch_event->getDescription());
27 }
28
29 public function patchEventDataProvider() {
30 $prophecy = $this->prophesize('Composer\Package\PackageInterface');
31 $package = $prophecy->reveal();
32
33 return array(
34 array(PatchEvents::PRE_PATCH_APPLY, $package, 'https://www.drupal.org', 'A test patch'),
35 array(PatchEvents::POST_PATCH_APPLY, $package, 'https://www.drupal.org', 'A test patch'),
36 );
37 }
38
39}
An exception for terminatinating execution or to throw for unit testing.
testGetters($event_name, PackageInterface $package, $url, $description)
Tests all the getters.
$url