ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
All Data Structures Namespaces Files Functions Variables Typedefs Modules Pages
ClientIdTest Class Reference
+ Inheritance diagram for ClientIdTest:
+ Collaboration diagram for ClientIdTest:

Public Member Functions

 clientIdProvider ()
 
 invalidClientIdProvider ()
 
 testValidArguments (string $value)
 
 tesInvalidArguments (string $value)
 

Protected Member Functions

 setUp ()
 

Private Attributes

 $f
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 11 of file ClientIdTest.php.

Member Function Documentation

◆ clientIdProvider()

ClientIdTest::clientIdProvider ( )
Returns
array[]

Definition at line 27 of file ClientIdTest.php.

27  : array
28  {
29  return [
30  ['default'],
31  ['default_with_underscore'],
32  ['ilias_with_12345'],
33  ];
34  }

◆ invalidClientIdProvider()

ClientIdTest::invalidClientIdProvider ( )
Returns
array[]

Definition at line 39 of file ClientIdTest.php.

39  : array
40  {
41  return [
42  ['../../some/obscure/path'],
43  ];
44  }

◆ setUp()

ClientIdTest::setUp ( )
protected

Definition at line 19 of file ClientIdTest.php.

20  {
21  $this->f = new Data\Factory();
22  }

◆ tesInvalidArguments()

ClientIdTest::tesInvalidArguments ( string  $value)
Parameters
string$valueinvalidClientIdProvider

Definition at line 60 of file ClientIdTest.php.

References PHPMailer\PHPMailer\$clientId.

61  {
62  try {
63  $clientId = $this->f->clientId($value);
64  $this->fail('This should not happen');
65  } catch (\InvalidArgumentException $e) {
66  $this->assertTrue(true);
67  }
68  }
if(array_key_exists('provider', $_GET)) elseif(array_key_exists('provider', $_SESSION)) if(!in_array($providerName, ['Google', 'Microsoft', 'Yahoo'])) $clientId

◆ testValidArguments()

ClientIdTest::testValidArguments ( string  $value)
Parameters
string$valueclientIdProvider

Definition at line 50 of file ClientIdTest.php.

References PHPMailer\PHPMailer\$clientId.

51  {
52  $clientId = $this->f->clientId($value);
53  $this->assertEquals($value, $clientId->toString());
54  }
if(array_key_exists('provider', $_GET)) elseif(array_key_exists('provider', $_SESSION)) if(!in_array($providerName, ['Google', 'Microsoft', 'Yahoo'])) $clientId

Field Documentation

◆ $f

ClientIdTest::$f
private

Definition at line 14 of file ClientIdTest.php.


The documentation for this class was generated from the following file: