1 | <?php |
||
2 | /** |
||
3 | * Composer plugin for config assembling |
||
4 | * |
||
5 | * @link https://github.com/hiqdev/composer-config-plugin |
||
6 | * @package composer-config-plugin |
||
7 | * @license BSD-3-Clause |
||
8 | * @copyright Copyright (c) 2016-2018, HiQDev (http://hiqdev.com/) |
||
9 | */ |
||
10 | |||
11 | namespace hiqdev\composer\config\tests\unit; |
||
12 | |||
13 | use Composer\Composer; |
||
14 | use Composer\Config; |
||
15 | use hiqdev\composer\config\Plugin; |
||
16 | |||
17 | /** |
||
18 | * Class PluginTest. |
||
19 | */ |
||
20 | class PluginTest extends \PHPUnit\Framework\TestCase |
||
21 | { |
||
22 | private $object; |
||
23 | private $io; |
||
24 | private $composer; |
||
25 | private $event; |
||
26 | private $packages = []; |
||
27 | |||
28 | public function setUp() |
||
29 | { |
||
30 | parent::setUp(); |
||
31 | $this->composer = new Composer(); |
||
32 | $this->composer->setConfig(new Config(true, getcwd())); |
||
33 | $this->io = $this->createMock('Composer\IO\IOInterface'); |
||
34 | $this->event = $this->getMockBuilder('Composer\Script\Event') |
||
35 | ->setConstructorArgs(['test', $this->composer, $this->io]) |
||
36 | ->getMock(); |
||
37 | |||
38 | $this->object = new Plugin(); |
||
39 | $this->object->setPackages($this->packages); |
||
40 | $this->object->activate($this->composer, $this->io); |
||
41 | } |
||
42 | |||
43 | public function testGetPackages() |
||
44 | { |
||
45 | $this->assertSame($this->packages, $this->object->getPackages()); |
||
46 | } |
||
47 | |||
48 | public function testGetSubscribedEvents() |
||
49 | { |
||
50 | $this->assertInternalType('array', $this->object->getSubscribedEvents()); |
||
0 ignored issues
–
show
|
|||
51 | } |
||
52 | } |
||
53 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.