◆ addressTypes()
ilMailAddressTypesTest::addressTypes |
( |
| ) |
|
- Returns
- array
Definition at line 69 of file ilMailAddressTypesTest.php.
References $result, and array.
75 array(
new ilMailAddress(
'#MyGroup',
''),
'ilMailGroupAddressType',
function() use ($that) {
76 $database = $that->getMockBuilder(
'ilDBInterface')->getMock();
77 $result = $that->getMockBuilder(
'ilDBStatement')->getMock();
78 $result->expects($that->any())->method(
'numRows')->will($that->returnValue(1));
79 $database->expects($that->any())->method(
'query')->will($that->returnValue(
$result));
80 $that->setGlobalVariable(
'ilDB', $database);
82 array(
new ilMailAddress(
'#MyGroup',
'ilias'),
'ilMailGroupAddressType',
function() use ($that) {
83 $database = $that->getMockBuilder(
'ilDBInterface')->getMock();
84 $result = $that->getMockBuilder(
'ilDBStatement')->getMock();
85 $result->expects($that->any())->method(
'numRows')->will($that->returnValue(1));
86 $database->expects($that->any())->method(
'query')->will($that->returnValue(
$result));
87 $that->setGlobalVariable(
'ilDB', $database);
91 array(
new ilMailAddress(
'phpunit',
'ilias.de'),
'ilMailLoginOrEmailAddressAddressType'),
92 array(
new ilMailAddress(
'#member',
'Course I'),
'ilMailRoleAddressType',
function() use ($that) {
93 $database = $that->getMockBuilder(
'ilDBInterface')->getMock();
94 $result = $that->getMockBuilder(
'ilDBStatement')->getMock();
95 $result->expects($that->any())->method(
'numRows')->will($that->returnValue(0));
96 $database->expects($that->any())->method(
'query')->will($that->returnValue(
$result));
97 $that->setGlobalVariable(
'ilDB', $database);
Create styles array
The data for the language used.
◆ setGlobalVariable()
ilMailAddressTypesTest::setGlobalVariable |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
|
protected |
◆ setUp()
ilMailAddressTypesTest::setUp |
( |
| ) |
|
Definition at line 39 of file ilMailAddressTypesTest.php.
References array, and setGlobalVariable().
41 $this->
setGlobalVariable(
'ilDB', $this->getMockBuilder(
'ilDBInterface')->getMock());
43 $user = $this->getMockBuilder(
'ilObjUser')->disableOriginalConstructor()->setMethods(
array(
'getId'))->getMock();
44 $user->expects($this->any())->method(
'getId')->will($this->returnValue(6));
setGlobalVariable($name, $value)
Create styles array
The data for the language used.
◆ testFactoryShouldReturnShouldReturnProperAddressType()
ilMailAddressTypesTest::testFactoryShouldReturnShouldReturnProperAddressType |
( |
ilMailAddress |
$address, |
|
|
|
$expectedAddressType, |
|
|
callable |
$preRunCallback = null |
|
) |
| |
The documentation for this class was generated from the following file: