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