@@ -18,33 +18,33 @@ |
||
18 | 18 | * @coversDefaultClass \ComponentManager\Component |
19 | 19 | */ |
20 | 20 | class ComponentTest extends TestCase { |
21 | - public function testGetNameParts() { |
|
22 | - $component = new Component('type_name', []); |
|
23 | - $this->assertEquals(['type', 'name'], $component->getNameParts()); |
|
24 | - $this->assertEquals('type', $component->getPluginType()); |
|
25 | - $this->assertEquals('name', $component->getPluginName()); |
|
26 | - } |
|
21 | + public function testGetNameParts() { |
|
22 | + $component = new Component('type_name', []); |
|
23 | + $this->assertEquals(['type', 'name'], $component->getNameParts()); |
|
24 | + $this->assertEquals('type', $component->getPluginType()); |
|
25 | + $this->assertEquals('name', $component->getPluginName()); |
|
26 | + } |
|
27 | 27 | |
28 | - public function testGetVersion() { |
|
29 | - $goodPackageRepository = $this->createMock(PackageRepository::class); |
|
30 | - $goodPackageRepository->method('satisfiesVersion') |
|
31 | - ->willReturn(true); |
|
32 | - $badPackageRepository = $this->createMock(PackageRepository::class); |
|
33 | - $badPackageRepository->method('satisfiesVersion') |
|
34 | - ->willReturn(false); |
|
28 | + public function testGetVersion() { |
|
29 | + $goodPackageRepository = $this->createMock(PackageRepository::class); |
|
30 | + $goodPackageRepository->method('satisfiesVersion') |
|
31 | + ->willReturn(true); |
|
32 | + $badPackageRepository = $this->createMock(PackageRepository::class); |
|
33 | + $badPackageRepository->method('satisfiesVersion') |
|
34 | + ->willReturn(false); |
|
35 | 35 | |
36 | - $componentVersion = new ComponentVersion( |
|
36 | + $componentVersion = new ComponentVersion( |
|
37 | 37 | '2015021800', 'Genesis', ComponentVersion::MATURITY_STABLE, []); |
38 | 38 | |
39 | - $component = new Component( |
|
39 | + $component = new Component( |
|
40 | 40 | 'type_name', [$componentVersion], $goodPackageRepository); |
41 | - $this->assertEquals( |
|
41 | + $this->assertEquals( |
|
42 | 42 | $componentVersion, $component->getVersion('2015021800')); |
43 | 43 | |
44 | - $this->expectException(UnsatisfiedVersionException::class); |
|
45 | - $this->expectExceptionCode(UnsatisfiedVersionException::CODE_UNKNOWN_VERSION); |
|
46 | - $component = new Component( |
|
44 | + $this->expectException(UnsatisfiedVersionException::class); |
|
45 | + $this->expectExceptionCode(UnsatisfiedVersionException::CODE_UNKNOWN_VERSION); |
|
46 | + $component = new Component( |
|
47 | 47 | 'type_name', [$componentVersion], $badPackageRepository); |
48 | - $component->getVersion('2015021800'); |
|
49 | - } |
|
48 | + $component->getVersion('2015021800'); |
|
49 | + } |
|
50 | 50 | } |