mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-27 21:15:40 +02:00
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84065 467b73ca-7a2a-4603-9d3b-597d59a354a9
111 lines
1.8 KiB
PHP
111 lines
1.8 KiB
PHP
<?php
|
|
|
|
$filesystemFixture = array(
|
|
'rahbeast/',
|
|
'rahbeast/_config.php' => <<<PHP
|
|
<?php
|
|
|
|
global \$project;
|
|
\$project = 'rahbeast';
|
|
|
|
PHP
|
|
,
|
|
'sapphire/',
|
|
'sapphire/_config.php',
|
|
'sapphire/MyClass.php' => <<<PHP
|
|
<?php
|
|
|
|
interface MyInterface {
|
|
|
|
}
|
|
interface OtherInterface {
|
|
|
|
}
|
|
class BaseClass {
|
|
|
|
}
|
|
|
|
/* This is a comment before */
|
|
class MyClass extends Object {
|
|
|
|
}
|
|
|
|
/* This is a comment between */
|
|
|
|
class MyClass_Other extends DataObject implements MyInterface {
|
|
|
|
}
|
|
|
|
class MyClass_Final extends DataObject implements MyInterface, OtherInterface {
|
|
|
|
}
|
|
|
|
/**
|
|
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.
|
|
"
|
|
|
|
/* 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.
|
|
"
|
|
|
|
?>
|
|
PHP
|
|
,
|
|
'sapphire/subdir/',
|
|
'sapphire/subdir/SubDirClass.php' => <<<PHP
|
|
<?php
|
|
|
|
class SubDirClass extends BaseClass implements MyInterace, OtherInterface {
|
|
|
|
}
|
|
PHP
|
|
,
|
|
'sapphire/subdir/SubDirClass.php',
|
|
'otherdir/',
|
|
'otherdir/OtherFile.php' => <<<PHP
|
|
<?php
|
|
|
|
class OtherFile extends BaseClass {
|
|
|
|
}
|
|
PHP
|
|
,
|
|
); |