Skip to content

Commit de42d6a

Browse files
committed
simplified ClassName::class syntax
1 parent f49f8cf commit de42d6a

12 files changed

+25
-25
lines changed

tests/Forms/Controls.Button.render.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test(function () {
2626
$input = $form->addButton('button', 'Caption');
2727

2828
Assert::null($input->getLabel());
29-
Assert::type(Nette\Utils\Html::class, $input->getControl());
29+
Assert::type(Html::class, $input->getControl());
3030
Assert::same('<input type="button" name="button" value="Caption">', (string) $input->getControl());
3131
Assert::same('<input type="button" name="button" value="Another caption">', (string) $input->getControl('Another caption'));
3232
});
@@ -74,7 +74,7 @@ test(function () { // SubmitButton
7474
$input = $form->addSubmit('button', 'Caption');
7575

7676
Assert::null($input->getLabel());
77-
Assert::type(Nette\Utils\Html::class, $input->getControl());
77+
Assert::type(Html::class, $input->getControl());
7878
Assert::same('<input type="submit" name="button" value="Caption">', (string) $input->getControl());
7979
Assert::same('<input type="submit" name="button" value="Another caption">', (string) $input->getControl('Another caption'));
8080
});

tests/Forms/Controls.Checkbox.render.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ test(function () {
2727

2828
Assert::null($input->getLabel());
2929

30-
Assert::type(Nette\Utils\Html::class, $input->getControl());
30+
Assert::type(Html::class, $input->getControl());
3131
Assert::same('<label for="frm-on"><input type="checkbox" name="on" id="frm-on">Label</label>', (string) $input->getControl());
3232

33-
Assert::type(Nette\Utils\Html::class, $input->getLabelPart());
33+
Assert::type(Html::class, $input->getLabelPart());
3434
Assert::same('<label for="frm-on">Label</label>', (string) $input->getLabelPart());
3535

36-
Assert::type(Nette\Utils\Html::class, $input->getControlPart());
36+
Assert::type(Html::class, $input->getControlPart());
3737
Assert::same('<input type="checkbox" name="on" id="frm-on">', (string) $input->getControlPart());
3838

3939
$input->setValue(TRUE);

tests/Forms/Controls.CheckboxList.render.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ test(function () {
2828
0 => 'Second',
2929
]);
3030

31-
Assert::type(Nette\Utils\Html::class, $input->getLabel());
31+
Assert::type(Html::class, $input->getLabel());
3232
Assert::same('<label>Label</label>', (string) $input->getLabel());
3333
Assert::same('<label>Another label</label>', (string) $input->getLabel('Another label'));
3434

35-
Assert::type(Nette\Utils\Html::class, $input->getLabelPart(0));
35+
Assert::type(Html::class, $input->getLabelPart(0));
3636
Assert::same('<label for="frm-list-0">Second</label>', (string) $input->getLabelPart(0));
3737

3838
Assert::type('string', $input->getControl());
3939
Assert::same('<label><input type="checkbox" name="list[]" value="a">First</label><br><label><input type="checkbox" name="list[]" value="0">Second</label>', $input->getControl());
4040

41-
Assert::type(Nette\Utils\Html::class, $input->getControlPart(0));
41+
Assert::type(Html::class, $input->getControlPart(0));
4242
Assert::same('<input type="checkbox" name="list[]" id="frm-list-0" value="0">', (string) $input->getControlPart(0));
4343
});
4444

tests/Forms/Controls.HiddenField.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test(function () {
2626
$input = $form->addHidden('hidden', 'value');
2727

2828
Assert::null($input->getLabel());
29-
Assert::type(Nette\Utils\Html::class, $input->getControl());
29+
Assert::type(Html::class, $input->getControl());
3030
Assert::same('<input type="hidden" name="hidden" value="value">', (string) $input->getControl());
3131
});
3232

tests/Forms/Controls.ImageButton.render.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test(function () {
2626
$input = $form->addImage('button', 'image.gif');
2727

2828
Assert::null($input->getLabel());
29-
Assert::type(Nette\Utils\Html::class, $input->getControl());
29+
Assert::type(Html::class, $input->getControl());
3030
Assert::same('<input type="image" name="button[]" src="image.gif">', (string) $input->getControl());
3131
});
3232

tests/Forms/Controls.MultiSelectBox.render.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ test(function () {
2828
0 => 'Second',
2929
]);
3030

31-
Assert::type(Nette\Utils\Html::class, $input->getLabel());
31+
Assert::type(Html::class, $input->getLabel());
3232
Assert::same('<label for="frm-list">Label</label>', (string) $input->getLabel());
3333
Assert::same('<label for="frm-list">Another label</label>', (string) $input->getLabel('Another label'));
3434

35-
Assert::type(Nette\Utils\Html::class, $input->getControl());
35+
Assert::type(Html::class, $input->getControl());
3636
Assert::same('<select name="list[]" id="frm-list" multiple><option value="a">First</option><option value="0">Second</option></select>', (string) $input->getControl());
3737
});
3838

tests/Forms/Controls.RadioList.render.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ test(function () {
2828
0 => 'Second',
2929
]);
3030

31-
Assert::type(Nette\Utils\Html::class, $input->getLabel());
31+
Assert::type(Html::class, $input->getLabel());
3232
Assert::same('<label>Label</label>', (string) $input->getLabel());
3333
Assert::same('<label>Another label</label>', (string) $input->getLabel('Another label'));
3434

35-
Assert::type(Nette\Utils\Html::class, $input->getLabelPart(0));
35+
Assert::type(Html::class, $input->getLabelPart(0));
3636
Assert::same('<label for="frm-list-0">Second</label>', (string) $input->getLabelPart(0));
3737

38-
Assert::type(Nette\Utils\Html::class, $input->getControl());
38+
Assert::type(Html::class, $input->getControl());
3939
Assert::same('<label><input type="radio" name="list" value="a">First</label><br><label><input type="radio" name="list" value="0">Second</label>', (string) $input->getControl());
4040

41-
Assert::type(Nette\Utils\Html::class, $input->getControlPart(0));
41+
Assert::type(Html::class, $input->getControlPart(0));
4242
Assert::same('<input type="radio" name="list" id="frm-list-0" value="0">', (string) $input->getControlPart(0));
4343
});
4444

tests/Forms/Controls.SelectBox.render.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ test(function () {
2828
0 => 'Second',
2929
]);
3030

31-
Assert::type(Nette\Utils\Html::class, $input->getLabel());
31+
Assert::type(Html::class, $input->getLabel());
3232
Assert::same('<label for="frm-list">Label</label>', (string) $input->getLabel());
3333
Assert::same('<label for="frm-list">Another label</label>', (string) $input->getLabel('Another label'));
3434

35-
Assert::type(Nette\Utils\Html::class, $input->getControl());
35+
Assert::type(Html::class, $input->getControl());
3636
Assert::same('<select name="list" id="frm-list"><option value="a">First</option><option value="0">Second</option></select>', (string) $input->getControl());
3737
});
3838

tests/Forms/Controls.TextArea.render.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ test(function () {
2727
->setValue('&text')
2828
->setAttribute('autocomplete', 'off');
2929

30-
Assert::type(Nette\Utils\Html::class, $input->getLabel());
30+
Assert::type(Html::class, $input->getLabel());
3131
Assert::same('<label for="frm-text">Label</label>', (string) $input->getLabel());
3232
Assert::same('<label for="frm-text">Another label</label>', (string) $input->getLabel('Another label'));
3333

34-
Assert::type(Nette\Utils\Html::class, $input->getControl());
34+
Assert::type(Html::class, $input->getControl());
3535
Assert::same('<textarea name="text" autocomplete="off" id="frm-text">&amp;text</textarea>', (string) $input->getControl());
3636
});
3737

tests/Forms/Controls.TextInput.render.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ test(function () {
2727
->setValue('text')
2828
->setAttribute('autocomplete', 'off');
2929

30-
Assert::type(Nette\Utils\Html::class, $input->getLabel());
30+
Assert::type(Html::class, $input->getLabel());
3131
Assert::same('<label for="frm-text">Label</label>', (string) $input->getLabel());
3232
Assert::same('<label for="frm-text">Another label</label>', (string) $input->getLabel('Another label'));
3333

34-
Assert::type(Nette\Utils\Html::class, $input->getControl());
34+
Assert::type(Html::class, $input->getControl());
3535
Assert::same('<input type="text" name="text" autocomplete="off" id="frm-text" value="text">', (string) $input->getControl());
3636
});
3737

0 commit comments

Comments
 (0)