Replace deprecated method calls

This commit is contained in:
Joas Schilling 2015-06-10 17:09:14 +02:00
parent 2b86eb0b29
commit d2ca3a25d3
8 changed files with 13 additions and 13 deletions

View File

@ -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]));
} }
} }

View File

@ -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;

View File

@ -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]);
} }
} }

View File

@ -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());

View File

@ -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"));
} }

View File

@ -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]));
} }
} }

View File

@ -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;

View File

@ -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]);
} }
} }