Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function testCreateIdFrom() |
||
28 | { |
||
29 | /** |
||
30 | * test function for generating an guid |
||
31 | * @return string fixed test string |
||
32 | */ |
||
33 | function test_com_create_guid() |
||
34 | { |
||
35 | return "{test-guid}"; |
||
36 | } |
||
37 | |||
38 | self::assertEquals('test-guid', |
||
39 | IdGenerator::createIdFrom('Tfboe\FmLib\Tests\Unit\Entity\Helpers\test_com_create_guid')); |
||
40 | |||
41 | self::assertRegExp('/^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/', IdGenerator::createIdFrom()); |
||
42 | } |
||
43 | |||
56 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: