mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Refactor assertions in AbstractAggregatorTest
The conditional checks in the AbstractAggregatorTest have been simplified. Instead of a complex inline condition with multiple checks, the test now uses straightforward assertions. This makes the code cleaner and easier to understand.
This commit is contained in:
parent
68d21c9267
commit
6bd38f1a58
@ -338,15 +338,11 @@ abstract class AbstractAggregatorTest extends KernelTestCase
|
|||||||
.'is a string or an be converted to a string', $key)
|
.'is a string or an be converted to a string', $key)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertTrue(
|
$head = \call_user_func($closure, '_header');
|
||||||
// conditions
|
|
||||||
\is_string((string) \call_user_func($closure, '_header'))
|
self::assertIsString($head);
|
||||||
&& !empty(\call_user_func($closure, '_header'))
|
self::assertNotEquals('', $head);
|
||||||
&& '_header' !== \call_user_func($closure, '_header'),
|
self::assertNotEquals('_header', $head);
|
||||||
// message
|
|
||||||
sprintf('Test that the callable return by `getLabels` for key %s '
|
|
||||||
.'can provide an header', $key)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user