support multiple teamleads in each team (#2702)
* fix jumping avatars * fix line-break after color dot for long names
This commit is contained in:
@@ -364,11 +364,7 @@ abstract class ControllerBaseTest extends WebTestCase
|
||||
*/
|
||||
protected function assertHasFlashSuccess(HttpKernelBrowser $client, string $message = null)
|
||||
{
|
||||
$content = $client->getResponse()->getContent();
|
||||
self::assertStringContainsString('ALERT.success(\'', $content, 'Could not find flash success message');
|
||||
if (null !== $message) {
|
||||
self::assertStringContainsString($message, $content);
|
||||
}
|
||||
$this->assertHasFlashMessage($client, 'success', $message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -376,10 +372,18 @@ abstract class ControllerBaseTest extends WebTestCase
|
||||
* @param string|null $message
|
||||
*/
|
||||
protected function assertHasFlashError(HttpKernelBrowser $client, string $message = null)
|
||||
{
|
||||
$this->assertHasFlashMessage($client, 'error', $message);
|
||||
}
|
||||
|
||||
private function assertHasFlashMessage(HttpKernelBrowser $client, string $type, string $message = null)
|
||||
{
|
||||
$content = $client->getResponse()->getContent();
|
||||
self::assertStringContainsString('ALERT.error(\'', $content, 'Could not find flash error message');
|
||||
self::assertStringContainsString('ALERT.' . $type . '(\'', $content, 'Could not find flash ' . $type . ' message');
|
||||
if (null !== $message) {
|
||||
// this is a lazy workaround, the templates use the javascript escape filter: |e('js')
|
||||
// if you ever want to test more complex strings, this logic has to be enhanced
|
||||
$message = str_replace([' ', ':'], ['\u0020', '\u003A'], $message);
|
||||
self::assertStringContainsString($message, $content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user