Skip to content

Commit 617fb9c

Browse files
Merge branch '4.4'
* 4.4: Fix assertInternalType deprecation in phpunit 9 Micro-typo fix add parameter type declarations to private methods
2 parents eef2882 + 4da5747 commit 617fb9c

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

Legacy/ForwardCompatTestTraitForV5.php

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,114 @@ private function doTearDown()
7979
{
8080
parent::tearDown();
8181
}
82+
83+
/**
84+
* @param string $message
85+
*
86+
* @return void
87+
*/
88+
public static function assertIsArray($actual, $message = '')
89+
{
90+
static::assertInternalType('array', $actual, $message);
91+
}
92+
93+
/**
94+
* @param string $message
95+
*
96+
* @return void
97+
*/
98+
public static function assertIsBool($actual, $message = '')
99+
{
100+
static::assertInternalType('bool', $actual, $message);
101+
}
102+
103+
/**
104+
* @param string $message
105+
*
106+
* @return void
107+
*/
108+
public static function assertIsFloat($actual, $message = '')
109+
{
110+
static::assertInternalType('float', $actual, $message);
111+
}
112+
113+
/**
114+
* @param string $message
115+
*
116+
* @return void
117+
*/
118+
public static function assertIsInt($actual, $message = '')
119+
{
120+
static::assertInternalType('int', $actual, $message);
121+
}
122+
123+
/**
124+
* @param string $message
125+
*
126+
* @return void
127+
*/
128+
public static function assertIsNumeric($actual, $message = '')
129+
{
130+
static::assertInternalType('numeric', $actual, $message);
131+
}
132+
133+
/**
134+
* @param string $message
135+
*
136+
* @return void
137+
*/
138+
public static function assertIsObject($actual, $message = '')
139+
{
140+
static::assertInternalType('object', $actual, $message);
141+
}
142+
143+
/**
144+
* @param string $message
145+
*
146+
* @return void
147+
*/
148+
public static function assertIsResource($actual, $message = '')
149+
{
150+
static::assertInternalType('resource', $actual, $message);
151+
}
152+
153+
/**
154+
* @param string $message
155+
*
156+
* @return void
157+
*/
158+
public static function assertIsString($actual, $message = '')
159+
{
160+
static::assertInternalType('string', $actual, $message);
161+
}
162+
163+
/**
164+
* @param string $message
165+
*
166+
* @return void
167+
*/
168+
public static function assertIsScalar($actual, $message = '')
169+
{
170+
static::assertInternalType('scalar', $actual, $message);
171+
}
172+
173+
/**
174+
* @param string $message
175+
*
176+
* @return void
177+
*/
178+
public static function assertIsCallable($actual, $message = '')
179+
{
180+
static::assertInternalType('callable', $actual, $message);
181+
}
182+
183+
/**
184+
* @param string $message
185+
*
186+
* @return void
187+
*/
188+
public static function assertIsIterable($actual, $message = '')
189+
{
190+
static::assertInternalType('iterable', $actual, $message);
191+
}
82192
}

0 commit comments

Comments
 (0)