Skip to content

Commit bf32631

Browse files
committed
Proxy call for older PHPUnit < 5
1 parent c5616f7 commit bf32631

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

tests/Gedmo/Tool/BaseTestCaseMongoODM.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ protected function setUp()
3939
}
4040
}
4141

42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function expectException($exception)
46+
{
47+
if (method_exists('PHPUnit\\Framework\\TestCase', 'setExpectedException')) {
48+
return parent::setExpectedException($exception);
49+
}
50+
51+
return parent::expectException($exception);
52+
}
53+
4254
/**
4355
* {@inheritdoc}
4456
*/

tests/Gedmo/Tool/BaseTestCaseOM.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ protected function setUp()
5454
{
5555
}
5656

57+
/**
58+
* {@inheritdoc}
59+
*/
60+
public function expectException($exception)
61+
{
62+
if (method_exists('PHPUnit\\Framework\\TestCase', 'setExpectedException')) {
63+
return parent::setExpectedException($exception);
64+
}
65+
66+
return parent::expectException($exception);
67+
}
68+
5769
/**
5870
* {@inheritdoc}
5971
*/

tests/Gedmo/Tool/BaseTestCaseORM.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ protected function setUp()
4646
{
4747
}
4848

49+
/**
50+
* {@inheritdoc}
51+
*/
52+
public function expectException($exception)
53+
{
54+
if (method_exists('PHPUnit\\Framework\\TestCase', 'setExpectedException')) {
55+
return parent::setExpectedException($exception);
56+
}
57+
58+
return parent::expectException($exception);
59+
}
60+
4961
/**
5062
* EntityManager mock object together with
5163
* annotation mapping driver and pdo_sqlite

0 commit comments

Comments
 (0)