mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +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:
		| @@ -338,15 +338,11 @@ abstract class AbstractAggregatorTest extends KernelTestCase | ||||
|                     .'is a string or an be converted to a string', $key) | ||||
|             ); | ||||
|  | ||||
|             $this->assertTrue( | ||||
|                 // conditions | ||||
|                 \is_string((string) \call_user_func($closure, '_header')) | ||||
|                 && !empty(\call_user_func($closure, '_header')) | ||||
|                 && '_header' !== \call_user_func($closure, '_header'), | ||||
|                 // message | ||||
|                 sprintf('Test that the callable return by `getLabels` for key %s ' | ||||
|                 .'can provide an header', $key) | ||||
|             ); | ||||
|             $head = \call_user_func($closure, '_header'); | ||||
|  | ||||
|             self::assertIsString($head); | ||||
|             self::assertNotEquals('', $head); | ||||
|             self::assertNotEquals('_header', $head); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user