1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-31 10:20:14 +02:00

Fix type errors, thanks phan

This commit is contained in:
Jordi Boggiano
2016-09-25 22:00:12 +02:00
parent 85792c8818
commit 5ce1c921ad
16 changed files with 56 additions and 68 deletions

View File

@@ -63,10 +63,10 @@ class ProcessHandlerTest extends TestCase
public function invalidCommandProvider()
{
return [
[1337],
[''],
[null],
[fopen('php://input', 'r')],
[1337, 'TypeError'],
['', 'InvalidArgumentException'],
[null, 'TypeError'],
[fopen('php://input', 'r'), 'TypeError'],
];
}
@@ -75,9 +75,9 @@ class ProcessHandlerTest extends TestCase
* @param mixed $invalidCommand
* @covers Monolog\Handler\ProcessHandler::guardAgainstInvalidCommand
*/
public function testConstructWithInvalidCommandThrowsInvalidArgumentException($invalidCommand)
public function testConstructWithInvalidCommandThrowsInvalidArgumentException($invalidCommand, $expectedExcep)
{
$this->setExpectedException('\InvalidArgumentException');
$this->setExpectedException($expectedExcep);
new ProcessHandler($invalidCommand, Logger::DEBUG);
}
@@ -89,9 +89,9 @@ class ProcessHandlerTest extends TestCase
public function invalidCwdProvider()
{
return [
[1337],
[''],
[fopen('php://input', 'r')],
[1337, 'TypeError'],
['', 'InvalidArgumentException'],
[fopen('php://input', 'r'), 'TypeError'],
];
}
@@ -100,9 +100,9 @@ class ProcessHandlerTest extends TestCase
* @param mixed $invalidCwd
* @covers Monolog\Handler\ProcessHandler::guardAgainstInvalidCwd
*/
public function testConstructWithInvalidCwdThrowsInvalidArgumentException($invalidCwd)
public function testConstructWithInvalidCwdThrowsInvalidArgumentException($invalidCwd, $expectedExcep)
{
$this->setExpectedException('\InvalidArgumentException');
$this->setExpectedException($expectedExcep);
new ProcessHandler(self::DUMMY_COMMAND, Logger::DEBUG, true, $invalidCwd);
}