| @@ 32-41 (lines=10) @@ | ||
| 29 | /** |
|
| 30 | * @test |
|
| 31 | */ |
|
| 32 | public function invalidConfigData() |
|
| 33 | { |
|
| 34 | $data = [ |
|
| 35 | 'pre-commit' => [ |
|
| 36 | 'execute' => ['phpunit' => 'dfaa'], |
|
| 37 | ], |
|
| 38 | ]; |
|
| 39 | ||
| 40 | $this->configFileReader->fileContents = $data; |
|
| 41 | ||
| 42 | $this->assertFalse($this->preCommitConfig->isEnabled('phpunit')); |
|
| 43 | } |
|
| 44 | ||
| @@ 48-57 (lines=10) @@ | ||
| 45 | /** |
|
| 46 | * @test |
|
| 47 | */ |
|
| 48 | public function serviceNameNotExists() |
|
| 49 | { |
|
| 50 | $data = [ |
|
| 51 | 'pre-commit' => [ |
|
| 52 | 'execute' => ['phpunit' => true], |
|
| 53 | ], |
|
| 54 | ]; |
|
| 55 | ||
| 56 | $this->configFileReader->fileContents = $data; |
|
| 57 | ||
| 58 | $this->assertFalse($this->preCommitConfig->isEnabled('serviceName')); |
|
| 59 | } |
|
| 60 | ||
| @@ 64-73 (lines=10) @@ | ||
| 61 | /** |
|
| 62 | * @test |
|
| 63 | */ |
|
| 64 | public function serviceIsEnabled() |
|
| 65 | { |
|
| 66 | $data = [ |
|
| 67 | 'pre-commit' => [ |
|
| 68 | 'execute' => ['phpunit' => true], |
|
| 69 | ], |
|
| 70 | ]; |
|
| 71 | ||
| 72 | $this->configFileReader->fileContents = $data; |
|
| 73 | ||
| 74 | $this->assertTrue($this->preCommitConfig->isEnabled('phpunit')); |
|
| 75 | } |
|
| 76 | ||