Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12241598
GetConfigurationTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
GetConfigurationTest.php
View Options
<?php
require
'../lib/GetConfiguration.php'
;
class
GetConfigurationTest
extends
PHPUnit_Framework_TestCase
{
public
function
testPrintConfiguration
()
{
$this
->
expectOutputString
(
'foo'
);
$instance
=
new
GetConfiguration
();
$instance
->
template
=
'foo'
;
$instance
->
printConfiguration
();
}
public
function
testSubstituteTemplateVariables
()
{
//Empty string
$this
->
assertEquals
(
''
,
GetConfiguration
::
substituteTemplateVariables
(
''
));
//Equivalent to an empty string
$this
->
assertEquals
(
''
,
GetConfiguration
::
substituteTemplateVariables
(
null
));
$this
->
assertEquals
(
''
,
GetConfiguration
::
substituteTemplateVariables
(
false
));
//Nothing to substitute
$this
->
assertEquals
(
'foo'
,
GetConfiguration
::
substituteTemplateVariables
(
'foo'
));
}
/**
* @requires OS Linux|BSD|CYGWIN|Darwin
*/
public
function
testSubstituteExec
()
{
$this
->
assertEquals
(
''
,
GetConfiguration
::
substituteExec
(
''
));
$template
=
'%%`echo -n ""`%%'
;
$this
->
assertEquals
(
''
,
GetConfiguration
::
substituteExec
(
$template
));
$template
=
'%%`echo ""`%%'
;
$this
->
assertEquals
(
''
,
GetConfiguration
::
substituteExec
(
$template
));
$template
=
'File is %%`ls GetConfigurationTest.php`%%.'
;
$this
->
assertEquals
(
'File is GetConfigurationTest.php.'
,
GetConfiguration
::
substituteExec
(
$template
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Oct 12, 05:24 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064615
Default Alt Text
GetConfigurationTest.php (1 KB)
Attached To
Mode
rZR Zemke-Rhyne
Attached
Detach File
Event Timeline
Log In to Comment