Skip to content

Commit 6891586

Browse files
committed
Simplify testing Action fields
1 parent e8b684e commit 6891586

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tests/Protocol/ActionTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ public function testIdCanBeSet()
1818
$this->assertEquals('123', $action->getActionId());
1919
}
2020

21-
public function testSerializeSimple()
21+
public function testOneFieldValue()
2222
{
2323
$action = new Action(array('Action' => 'name'));
2424

2525
$this->assertEquals("Action: name\r\n\r\n", $action->getMessageSerialized());
2626
}
2727

28-
public function testSerializeKeySingle()
28+
public function testMultipleFieldsSingleValue()
2929
{
3030
$action = new Action(array('Action' => 'name', 'Key' => 'Value'));
3131

3232
$this->assertEquals("Action: name\r\nKey: Value\r\n\r\n", $action->getMessageSerialized());
3333
}
3434

35-
public function testSerializeKeyMultipleValues()
35+
public function testOneFieldMultipleValues()
3636
{
37-
$action = new Action(array('Action' => 'name', 'Key' => array('Value1', 'Value2')));
37+
$action = new Action(array('Key' => array('Value1', 'Value2')));
3838

39-
$this->assertEquals("Action: name\r\nKey: Value1\r\nKey: Value2\r\n\r\n", $action->getMessageSerialized());
39+
$this->assertEquals("Key: Value1\r\nKey: Value2\r\n\r\n", $action->getMessageSerialized());
4040
}
4141

42-
public function testSerializeKeyMultipleKeyValues()
42+
public function testOneFieldMultipleKeyValues()
4343
{
44-
$action = new Action(array('Action' => 'name', 'Variables' => array('first' => 'on', 'second' => 'off')));
44+
$action = new Action(array('Variables' => array('first' => 'on', 'second' => 'off')));
4545

46-
$this->assertEquals("Action: name\r\nVariables: first=on\r\nVariables: second=off\r\n\r\n", $action->getMessageSerialized());
46+
$this->assertEquals("Variables: first=on\r\nVariables: second=off\r\n\r\n", $action->getMessageSerialized());
4747
}
4848
}

0 commit comments

Comments
 (0)