Skip to content

Commit d51d8f6

Browse files
committed
properly move test methods
1 parent ae596c9 commit d51d8f6

File tree

2 files changed

+0
-152
lines changed

2 files changed

+0
-152
lines changed

Tests/AbstractDivLayoutTest.php

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -931,80 +931,4 @@ public function testWidgetContainerAttributeNameRepeatedIfTrue()
931931
// foo="foo"
932932
$this->assertContains('<div id="form" foo="foo">', $html);
933933
}
934-
935-
public function testLabelWithTranslationParameters()
936-
{
937-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType');
938-
$html = $this->renderLabel($form->createView(), 'Address is %address%', [
939-
'label_translation_parameters' => [
940-
'%address%' => 'Paris, rue de la Paix',
941-
],
942-
]);
943-
944-
$this->assertMatchesXpath($html,
945-
'/label
946-
[@for="name"]
947-
[.="[trans]Address is Paris, rue de la Paix[/trans]"]
948-
'
949-
);
950-
}
951-
952-
public function testHelpWithTranslationParameters()
953-
{
954-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [
955-
'help' => 'for company %company%',
956-
'help_translation_parameters' => [
957-
'%company%' => 'ACME Ltd.',
958-
],
959-
]);
960-
$html = $this->renderHelp($form->createView());
961-
962-
$this->assertMatchesXpath($html,
963-
'/*
964-
[@id="name_help"]
965-
[.="[trans]for company ACME Ltd.[/trans]"]
966-
'
967-
);
968-
}
969-
970-
public function testAttributesWithTranslationParameters()
971-
{
972-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [
973-
'attr' => [
974-
'title' => 'Message to %company%',
975-
'placeholder' => 'Enter a message to %company%',
976-
],
977-
'attr_translation_parameters' => [
978-
'%company%' => 'ACME Ltd.',
979-
],
980-
]);
981-
$html = $this->renderWidget($form->createView());
982-
983-
$this->assertMatchesXpath($html,
984-
'/input
985-
[@title="[trans]Message to ACME Ltd.[/trans]"]
986-
[@placeholder="[trans]Enter a message to ACME Ltd.[/trans]"]
987-
'
988-
);
989-
}
990-
991-
public function testButtonWithTranslationParameters()
992-
{
993-
$form = $this->factory->createNamedBuilder('myform')
994-
->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', [
995-
'label' => 'Submit to %company%',
996-
'label_translation_parameters' => [
997-
'%company%' => 'ACME Ltd.',
998-
],
999-
])
1000-
->getForm();
1001-
$view = $form->get('mybutton')->createView();
1002-
$html = $this->renderWidget($view, ['label_format' => 'form.%name%']);
1003-
1004-
$this->assertMatchesXpath($html,
1005-
'/button
1006-
[.="[trans]Submit to ACME Ltd.[/trans]"]
1007-
'
1008-
);
1009-
}
1010934
}

Tests/AbstractTableLayoutTest.php

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -533,80 +533,4 @@ public function testWidgetContainerAttributeNameRepeatedIfTrue()
533533
// foo="foo"
534534
$this->assertContains('<table id="form" foo="foo">', $html);
535535
}
536-
537-
public function testLabelWithTranslationParameters()
538-
{
539-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType');
540-
$html = $this->renderLabel($form->createView(), 'Address is %address%', [
541-
'label_translation_parameters' => [
542-
'%address%' => 'Paris, rue de la Paix',
543-
],
544-
]);
545-
546-
$this->assertMatchesXpath($html,
547-
'/label
548-
[@for="name"]
549-
[.="[trans]Address is Paris, rue de la Paix[/trans]"]
550-
'
551-
);
552-
}
553-
554-
public function testHelpWithTranslationParameters()
555-
{
556-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [
557-
'help' => 'for company %company%',
558-
'help_translation_parameters' => [
559-
'%company%' => 'ACME Ltd.',
560-
],
561-
]);
562-
$html = $this->renderHelp($form->createView());
563-
564-
$this->assertMatchesXpath($html,
565-
'/*
566-
[@id="name_help"]
567-
[.="[trans]for company ACME Ltd.[/trans]"]
568-
'
569-
);
570-
}
571-
572-
public function testAttributesWithTranslationParameters()
573-
{
574-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [
575-
'attr' => [
576-
'title' => 'Message to %company%',
577-
'placeholder' => 'Enter a message to %company%',
578-
],
579-
'attr_translation_parameters' => [
580-
'%company%' => 'ACME Ltd.',
581-
],
582-
]);
583-
$html = $this->renderWidget($form->createView());
584-
585-
$this->assertMatchesXpath($html,
586-
'/input
587-
[@title="[trans]Message to ACME Ltd.[/trans]"]
588-
[@placeholder="[trans]Enter a message to ACME Ltd.[/trans]"]
589-
'
590-
);
591-
}
592-
593-
public function testButtonWithTranslationParameters()
594-
{
595-
$form = $this->factory->createNamedBuilder('myform')
596-
->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', [
597-
'label' => 'Submit to %company%',
598-
'label_translation_parameters' => [
599-
'%company%' => 'ACME Ltd.',
600-
],
601-
])
602-
->getForm();
603-
$view = $form->get('mybutton')->createView();
604-
$html = $this->renderWidget($view, ['label_format' => 'form.%name%']);
605-
606-
$this->assertMatchesXpath($html,
607-
'/button
608-
[.="[trans]Submit to ACME Ltd.[/trans]"]
609-
'
610-
);
611-
}
612536
}

0 commit comments

Comments
 (0)