mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
refactor/fix (#3924)
This commit is contained in:
@@ -30,12 +30,12 @@ class BridgeCardTest extends TestCase
|
||||
'defaultValue' => 'yo1',
|
||||
'exampleValue' => 'yo2',
|
||||
];
|
||||
$this->assertSame('<input id="id" type="text" value="yo1" placeholder="yo2" name="name" />' . "\n", BridgeCard::getTextInput($entry, 'id', 'name'));
|
||||
$this->assertSame('<input id="id" type="text" value="yo1" placeholder="yo2" name="name" />', BridgeCard::getTextInput($entry, 'id', 'name'));
|
||||
|
||||
$entry = [
|
||||
'values' => [],
|
||||
];
|
||||
$this->assertSame('<select id="id" name="name" ></select>', BridgeCard::getListInput($entry, 'id', 'name'));
|
||||
$this->assertSame('<select id="id" name="name" >' . "\n" . '</select>', BridgeCard::getListInput($entry, 'id', 'name'));
|
||||
|
||||
$entry = [
|
||||
'defaultValue' => 2,
|
||||
@@ -43,7 +43,7 @@ class BridgeCardTest extends TestCase
|
||||
'foo' => 'bar',
|
||||
],
|
||||
];
|
||||
$this->assertSame('<select id="id" name="name" ><option value="bar">foo</option></select>', BridgeCard::getListInput($entry, 'id', 'name'));
|
||||
$this->assertSame('<select id="id" name="name" >' . "\n" . '<option value="bar">foo</option>' . "\n" . '</select>', BridgeCard::getListInput($entry, 'id', 'name'));
|
||||
|
||||
// optgroup
|
||||
$entry = [
|
||||
@@ -52,6 +52,9 @@ class BridgeCardTest extends TestCase
|
||||
'f' => 'b',
|
||||
]],
|
||||
];
|
||||
$this->assertSame('<select id="id" name="name" ><optgroup label="kek"><option value="b">f</option></optgroup></select>', BridgeCard::getListInput($entry, 'id', 'name'));
|
||||
$this->assertSame(
|
||||
'<select id="id" name="name" >' . "\n" . '<optgroup label="kek"><option value="b">f</option></optgroup></select>',
|
||||
BridgeCard::getListInput($entry, 'id', 'name')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user