Definition at line 7 of file ParameterTest.php.
◆ testCastNullToString()
Sabre\VObject\ParameterTest::testCastNullToString |
( |
| ) |
|
Definition at line 59 of file ParameterTest.php.
61 $cal =
new Component\VCalendar();
62 $param =
new Parameter($cal,
'name', null);
63 $this->assertEquals(
'', $param->__toString());
64 $this->assertEquals(
'', (
string)$param);
◆ testCastToString()
Sabre\VObject\ParameterTest::testCastToString |
( |
| ) |
|
Definition at line 50 of file ParameterTest.php.
52 $cal =
new Component\VCalendar();
53 $param =
new Parameter($cal,
'name',
'value');
54 $this->assertEquals(
'value', $param->__toString());
55 $this->assertEquals(
'value', (
string)$param);
◆ testIterate()
Sabre\VObject\ParameterTest::testIterate |
( |
| ) |
|
Definition at line 106 of file ParameterTest.php.
References $result.
108 $cal =
new Component\VCalendar();
110 $param =
new Parameter($cal,
'name', [1, 2, 3, 4]);
113 foreach ($param as $value) {
117 $this->assertEquals([1, 2, 3, 4],
$result);
◆ testModify()
Sabre\VObject\ParameterTest::testModify |
( |
| ) |
|
Definition at line 30 of file ParameterTest.php.
32 $cal =
new Component\VCalendar();
34 $param =
new Parameter($cal,
'name', null);
36 $this->assertEquals([1], $param->getParts());
38 $param->setParts([1, 2]);
39 $this->assertEquals([1, 2], $param->getParts());
42 $this->assertEquals([1, 2, 3], $param->getParts());
46 $this->assertEquals([4, 5], $param->getParts());
◆ testSerialize()
Sabre\VObject\ParameterTest::testSerialize |
( |
| ) |
|
Definition at line 68 of file ParameterTest.php.
70 $cal =
new Component\VCalendar();
71 $param =
new Parameter($cal,
'name',
'value');
72 $this->assertEquals(
'NAME=value', $param->serialize());
◆ testSerializeColon()
Sabre\VObject\ParameterTest::testSerializeColon |
( |
| ) |
|
Definition at line 121 of file ParameterTest.php.
123 $cal =
new Component\VCalendar();
124 $param =
new Parameter($cal,
'name',
'va:lue');
125 $this->assertEquals(
'NAME="va:lue"', $param->serialize());
◆ testSerializeComplex()
Sabre\VObject\ParameterTest::testSerializeComplex |
( |
| ) |
|
Definition at line 84 of file ParameterTest.php.
86 $cal =
new Component\VCalendar();
87 $param =
new Parameter($cal,
'name', [
"val1",
"val2;",
"val3^",
"val4\n",
"val5\""]);
88 $this->assertEquals(
'NAME=val1,"val2;","val3^^","val4^n","val5^\'"', $param->serialize());
◆ testSerializeEmpty()
Sabre\VObject\ParameterTest::testSerializeEmpty |
( |
| ) |
|
Definition at line 76 of file ParameterTest.php.
78 $cal =
new Component\VCalendar();
79 $param =
new Parameter($cal,
'name', null);
80 $this->assertEquals(
'NAME=', $param->serialize());
◆ testSerializePlusSign()
Sabre\VObject\ParameterTest::testSerializePlusSign |
( |
| ) |
|
iCal 7.0 (OSX 10.9) has major issues with the EMAIL property, when the value contains a plus sign, and it's not quoted.
So we specifically added support for that.
Definition at line 98 of file ParameterTest.php.
100 $cal =
new Component\VCalendar();
101 $param =
new Parameter($cal,
'EMAIL',
"user+something@example.org");
102 $this->assertEquals(
'EMAIL="user+something@example.org"', $param->serialize());
◆ testSerializeSemiColon()
Sabre\VObject\ParameterTest::testSerializeSemiColon |
( |
| ) |
|
Definition at line 129 of file ParameterTest.php.
131 $cal =
new Component\VCalendar();
132 $param =
new Parameter($cal,
'name',
'va;lue');
133 $this->assertEquals(
'NAME="va;lue"', $param->serialize());
◆ testSetup()
Sabre\VObject\ParameterTest::testSetup |
( |
| ) |
|
Definition at line 9 of file ParameterTest.php.
11 $cal =
new Component\VCalendar();
13 $param =
new Parameter($cal,
'name',
'value');
14 $this->assertEquals(
'NAME', $param->name);
15 $this->assertEquals(
'value', $param->getValue());
◆ testSetupNameLess()
Sabre\VObject\ParameterTest::testSetupNameLess |
( |
| ) |
|
Definition at line 19 of file ParameterTest.php.
21 $card =
new Component\VCard();
23 $param =
new Parameter($card, null,
'URL');
24 $this->assertEquals(
'VALUE', $param->name);
25 $this->assertEquals(
'URL', $param->getValue());
26 $this->assertTrue($param->noName);
The documentation for this class was generated from the following file: