|
23 | 23 | class TablesWhitelistGenerateCommandTest extends TestCase
|
24 | 24 | {
|
25 | 25 | // Exception Messages!
|
26 |
| - const CONFIG_EXCEPTION = 'Configuration Exception'; |
27 |
| - const EXCEPTION = 'General Exception'; |
| 26 | + const CONFIG_EXCEPTION_MESSAGE = 'Configuration Exception Message'; |
| 27 | + const EXCEPTION_MESSAGE = 'General Exception Message'; |
28 | 28 |
|
29 | 29 | /** @var WhitelistGenerator|MockObject $whitelistGenerator */
|
30 | 30 | private $whitelistGenerator;
|
@@ -75,9 +75,11 @@ public function testCommandFailure(string $arguments, string $expected, $excepti
|
75 | 75 | $this->whitelistGenerator->expects($this->once())
|
76 | 76 | ->method('generate')
|
77 | 77 | ->with($arguments)
|
78 |
| - ->willReturnCallback(function () use ($exception) { |
79 |
| - throw $exception; |
80 |
| - }); |
| 78 | + ->willReturnCallback( |
| 79 | + function () use ($exception) { |
| 80 | + throw $exception; |
| 81 | + } |
| 82 | + ); |
81 | 83 |
|
82 | 84 | $commandTest = $this->execute($arguments);
|
83 | 85 | $this->assertEquals($expected, $commandTest->getStatusCode());
|
@@ -115,26 +117,26 @@ public function failureDataProvider()
|
115 | 117 | [
|
116 | 118 | 'all',
|
117 | 119 | Cli::RETURN_FAILURE,
|
118 |
| - new ConfigException(__(self::CONFIG_EXCEPTION)), |
119 |
| - self::CONFIG_EXCEPTION |
| 120 | + new ConfigException(__('Configuration Exception Message')), |
| 121 | + self::CONFIG_EXCEPTION_MESSAGE |
120 | 122 | ],
|
121 | 123 | [
|
122 | 124 | 'Module_Name',
|
123 | 125 | Cli::RETURN_FAILURE,
|
124 |
| - new ConfigException(__(self::CONFIG_EXCEPTION)), |
125 |
| - self::CONFIG_EXCEPTION |
| 126 | + new ConfigException(__('Configuration Exception Message')), |
| 127 | + self::CONFIG_EXCEPTION_MESSAGE |
126 | 128 | ],
|
127 | 129 | [
|
128 | 130 | 'all',
|
129 | 131 | Cli::RETURN_FAILURE,
|
130 |
| - new \Exception(self::EXCEPTION), |
131 |
| - self::EXCEPTION |
| 132 | + new \Exception(self::EXCEPTION_MESSAGE), |
| 133 | + self::EXCEPTION_MESSAGE |
132 | 134 | ],
|
133 | 135 | [
|
134 | 136 | 'Module_Name',
|
135 | 137 | Cli::RETURN_FAILURE,
|
136 |
| - new \Exception(self::EXCEPTION), |
137 |
| - self::EXCEPTION |
| 138 | + new \Exception(self::EXCEPTION_MESSAGE), |
| 139 | + self::EXCEPTION_MESSAGE |
138 | 140 | ]
|
139 | 141 | ];
|
140 | 142 | }
|
|
0 commit comments