|
5 | 5 | use CurrencyCloud\Client; |
6 | 6 | use CurrencyCloud\SimpleEntityManager; |
7 | 7 | use DateTime; |
8 | | -use PHPUnit_Framework_TestCase; |
| 8 | +use PHPUnit\Framework\TestCase; |
| 9 | + |
9 | 10 | use ReflectionClass; |
10 | 11 |
|
11 | | -class BaseCurrencyCloudTestCase extends PHPUnit_Framework_TestCase |
| 12 | +class BaseCurrencyCloudTestCase extends TestCase |
12 | 13 | { |
13 | 14 |
|
14 | 15 | /** |
@@ -55,7 +56,7 @@ protected function getMockedEntityManager($expectedModel, $changeSet) |
55 | 56 |
|
56 | 57 | protected function validateObjectStrictName($object, $dummy) |
57 | 58 | { |
58 | | - $this->assertInternalType('object', $object); |
| 59 | + $this->assertIsObject( $object); |
59 | 60 | foreach ($dummy as $key => $original) { |
60 | 61 | $parts = explode('_', $key); |
61 | 62 | $uCased = implode('', array_map('ucfirst', $parts)); |
@@ -125,4 +126,17 @@ protected function setIdProperty($object, $value, $propertyName = 'id') |
125 | 126 | $property->setAccessible(true); |
126 | 127 | $property->setValue($object, $value); |
127 | 128 | } |
| 129 | + |
| 130 | + |
| 131 | + protected function getMock($className){ |
| 132 | + return $this->createMock($className); |
| 133 | + } |
| 134 | + |
| 135 | + protected function setExpectedException(string $class, string $string=null) |
| 136 | + { |
| 137 | + $this->expectException($class); |
| 138 | + if($string){ |
| 139 | + $this->expectExceptionMessage($string); |
| 140 | + } |
| 141 | + } |
128 | 142 | } |
0 commit comments