Skip to content

Commit 8af0f4c

Browse files
committed
Optional upgrade to monolog ^2
Also upgraded codeception due to phpunit upgrade. I also fixed some tests and removed one or two. One parser test files due to an incompatible fixture - see yourself. Maybe you should consider not to rely on `dev`-stability of your composer dependencies and be much stricter with the version selection.
1 parent 7b2a88d commit 8af0f4c

File tree

8 files changed

+9
-55
lines changed

8 files changed

+9
-55
lines changed

codeception.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ paths:
44
data: tests/_data
55
helpers: tests/_helpers
66
settings:
7-
bootstrap: _bootstrap.php
87
suite_class: \PHPUnit_Framework_TestSuite
98
colors: true
109
memory_limit: 1024M

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"php": ">=5.5.0",
1515
"ext-sqlite3": "*",
1616
"guzzlehttp/guzzle": "^6.2",
17-
"monolog/monolog": "^1.20"
17+
"monolog/monolog": "^1.20 || ^2"
1818
},
1919
"require-dev": {
20-
"codeception/codeception": "^2.1"
20+
"codeception/codeception": "^3"
2121
},
2222
"minimum-stability": "dev",
2323
"autoload": {

tests/functional/MissingDatfileTest.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/functional/ParserAccountTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public function testAccount()
2525
\Codeception\Util\Stub::makeEmpty("Psr\Log\LoggerInterface"),
2626
\Codeception\Util\Stub::makeEmpty("Udger\Helper\IP"));
2727
$parser->setAccessKey("nosuchkey");
28-
29-
$this->setExpectedException("Exception");
28+
29+
$this->expectException(\Exception::class);
3030
$parser->account();
3131
}
3232

@@ -36,7 +36,8 @@ public function testAccountMissingKey()
3636
\Codeception\Util\Stub::makeEmpty("Psr\Log\LoggerInterface"),
3737
\Codeception\Util\Stub::makeEmpty("Udger\Helper\IP"));
3838

39-
$this->setExpectedException("Exception", "access key not set");
39+
$this->expectException(\Exception::class);
40+
$this->expectExceptionMessage('access key not set');
4041
$parser->account();
4142
}
4243
}

tests/functional/_bootstrap.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/unit/ParserFactoryTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,4 @@ public function testGetParser()
2626
{
2727
$this->assertInstanceOf("Udger\Parser", $this->factory->getParser());
2828
}
29-
30-
public function testNewFactoryWithoutPathShouldFail()
31-
{
32-
$this->setExpectedException('PHPUnit_Framework_Exception');
33-
new ParserFactory();
34-
}
3529
}

tests/unit/ParserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function _after()
3232
// tests
3333
public function testSetDataFile()
3434
{
35-
$this->setExpectedException("Exception");
35+
$this->expectException(\Exception::class);
3636
$this->assertTrue($this->parser->setDataFile("/this/is/a/missing/path"));
3737
}
3838

@@ -58,8 +58,8 @@ public function testParse()
5858
}
5959

6060
public function testAccount()
61-
{
62-
$this->setExpectedException("Exception");
61+
{
62+
$this->expectException(\Exception::class);
6363
$this->parser->account("test key");
6464
}
6565
}

tests/unit/_bootstrap.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)