Replace deprecated method calls
This commit is contained in:
parent
2b86eb0b29
commit
d2ca3a25d3
|
@ -118,6 +118,6 @@ class DeleteConfigTest extends TestCase {
|
|||
->method('writeln')
|
||||
->with($this->stringContains($expectedMessage));
|
||||
|
||||
$this->assertSame($expectedReturn, \Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
$this->assertSame($expectedReturn, $this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ class GetConfigTest extends TestCase {
|
|||
});
|
||||
}
|
||||
|
||||
$this->assertSame($expectedReturn, \Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
$this->assertSame($expectedReturn, $this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
|
||||
if ($expectedMessage !== null) {
|
||||
global $output;
|
||||
|
|
|
@ -113,6 +113,6 @@ class SetConfigTest extends TestCase {
|
|||
->method('writeln')
|
||||
->with($this->stringContains($expectedMessage));
|
||||
|
||||
\Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
|
||||
$this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class ImportTest extends TestCase {
|
|||
* @param mixed $configValue
|
||||
*/
|
||||
public function testValidateAppsArray($configValue) {
|
||||
\Test_Helper::invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]);
|
||||
$this->invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]);
|
||||
$this->assertTrue(true, 'Asserting that no exception is thrown');
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ class ImportTest extends TestCase {
|
|||
*/
|
||||
public function testValidateAppsArrayThrows($configValue) {
|
||||
try {
|
||||
\Test_Helper::invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]);
|
||||
$this->invokePrivate($this->command, 'validateAppsArray', [['app' => ['name' => $configValue]]]);
|
||||
$this->fail('Did not throw expected UnexpectedValueException');
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
$this->assertStringStartsWith('Invalid app config value for "app":"name".', $e->getMessage());
|
||||
|
@ -115,7 +115,7 @@ class ImportTest extends TestCase {
|
|||
* @param mixed $configValue
|
||||
*/
|
||||
public function testCheckTypeRecursively($configValue) {
|
||||
\Test_Helper::invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']);
|
||||
$this->invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']);
|
||||
$this->assertTrue(true, 'Asserting that no exception is thrown');
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ class ImportTest extends TestCase {
|
|||
*/
|
||||
public function testCheckTypeRecursivelyThrows($configValue) {
|
||||
try {
|
||||
\Test_Helper::invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']);
|
||||
$this->invokePrivate($this->command, 'checkTypeRecursively', [$configValue, 'name']);
|
||||
$this->fail('Did not throw expected UnexpectedValueException');
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
$this->assertStringStartsWith('Invalid system config value for "name"', $e->getMessage());
|
||||
|
@ -156,7 +156,7 @@ class ImportTest extends TestCase {
|
|||
* @param array $configArray
|
||||
*/
|
||||
public function testValidateArray($configArray) {
|
||||
\Test_Helper::invokePrivate($this->command, 'validateArray', [$configArray]);
|
||||
$this->invokePrivate($this->command, 'validateArray', [$configArray]);
|
||||
$this->assertTrue(true, 'Asserting that no exception is thrown');
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ class ImportTest extends TestCase {
|
|||
*/
|
||||
public function testValidateArrayThrows($configArray, $expectedException) {
|
||||
try {
|
||||
\Test_Helper::invokePrivate($this->command, 'validateArray', [$configArray]);
|
||||
$this->invokePrivate($this->command, 'validateArray', [$configArray]);
|
||||
$this->fail('Did not throw expected UnexpectedValueException');
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
$this->assertStringStartsWith($expectedException, $e->getMessage());
|
||||
|
|
|
@ -281,7 +281,7 @@ class ListConfigsTest extends TestCase {
|
|||
return $output;
|
||||
});
|
||||
|
||||
\Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
|
||||
$this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
|
||||
|
||||
$this->assertEquals($expected, trim($output, "\n"));
|
||||
}
|
||||
|
|
|
@ -115,6 +115,6 @@ class DeleteConfigTest extends TestCase {
|
|||
->method('writeln')
|
||||
->with($this->stringContains($expectedMessage));
|
||||
|
||||
$this->assertSame($expectedReturn, \Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
$this->assertSame($expectedReturn, $this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ class GetConfigTest extends TestCase {
|
|||
});
|
||||
}
|
||||
|
||||
$this->assertSame($expectedReturn, \Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
$this->assertSame($expectedReturn, $this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]));
|
||||
|
||||
if ($expectedMessage !== null) {
|
||||
global $output;
|
||||
|
|
|
@ -110,6 +110,6 @@ class SetConfigTest extends TestCase {
|
|||
->method('writeln')
|
||||
->with($this->stringContains($expectedMessage));
|
||||
|
||||
\Test_Helper::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
|
||||
$this->invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue