2008-03-31 00:00:16 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$filesystemFixture = array(
|
|
|
|
'rahbeast/',
|
|
|
|
'rahbeast/_config.php' => <<<PHP
|
|
|
|
<?php
|
|
|
|
|
|
|
|
global \$project;
|
|
|
|
\$project = 'rahbeast';
|
|
|
|
|
|
|
|
PHP
|
|
|
|
,
|
|
|
|
'sapphire/',
|
|
|
|
'sapphire/_config.php',
|
|
|
|
'sapphire/MyClass.php' => <<<PHP
|
|
|
|
<?php
|
|
|
|
|
2008-04-07 06:42:35 +02:00
|
|
|
/* This is a comment before */
|
2008-03-31 00:00:16 +02:00
|
|
|
class MyClass extends Object {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2008-04-07 06:42:35 +02:00
|
|
|
/* This is a comment between */
|
|
|
|
|
2008-03-31 00:00:16 +02:00
|
|
|
class MyClass_Other extends DataObject implements Something {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2008-04-08 08:17:58 +02:00
|
|
|
class MyClass_Final extends DataObject implements Something, OtherClass {
|
2008-03-31 00:00:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2008-04-07 06:42:35 +02:00
|
|
|
/**
|
|
|
|
Here we have a class in a comment:
|
|
|
|
class MyClass_InComment extends DataObject {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
This class definition isn't named correctly:
|
|
|
|
class UnrelatedCLass extends DataObject {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// This is another class definition: class MyClass_InSlashSlashComment extends DataObject {
|
|
|
|
|
|
|
|
// Here's a class definition in a string:
|
|
|
|
\$string = <<<MYCODE
|
|
|
|
|
|
|
|
class MyClass_InHeredocString extends DataObject {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
MYCODE;
|
|
|
|
|
|
|
|
// Other definitions inside strings:
|
|
|
|
\$string2 = 'class MyClass_InSingleQuoteString extends DataObject {
|
|
|
|
}'
|
|
|
|
\$string3 = "class MyClass_InDoubleQuoteString extends DataObject {
|
|
|
|
}
|
|
|
|
|
|
|
|
I've included \"an escaped quote\" in this to ensure that it can handle that.
|
|
|
|
"
|
|
|
|
|
2008-04-08 08:17:58 +02:00
|
|
|
/* let's define a class between two strings to confirm that it gets discovered */
|
|
|
|
class MyClass_ClassBetweenTwoStrings extends DataObject {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\$string4 = "class MyClass_InDoubleQuoteString extends DataObject {
|
|
|
|
}
|
|
|
|
|
|
|
|
I've included \"an escaped quote\" in this to ensure that it can handle that.
|
|
|
|
"
|
|
|
|
|
2008-03-31 00:00:16 +02:00
|
|
|
?>
|
|
|
|
PHP
|
|
|
|
,
|
|
|
|
'sapphire/subdir/',
|
|
|
|
'sapphire/subdir/SubDirClass.php' => <<<PHP
|
|
|
|
<?php
|
|
|
|
|
|
|
|
class SubDirClass extends Something implements Else, Other {
|
|
|
|
|
|
|
|
}
|
|
|
|
PHP
|
|
|
|
,
|
|
|
|
'sapphire/subdir/SubDirClass.php',
|
|
|
|
'otherdir/',
|
|
|
|
'otherdir/OtherFile.php' => <<<PHP
|
|
|
|
<?php
|
|
|
|
|
|
|
|
class OtherFile extends Object {
|
|
|
|
|
|
|
|
}
|
|
|
|
PHP
|
|
|
|
,
|
|
|
|
);
|