silverstripe-framework/tests/ManifestBuilderTest.fixture.inc
Sam Minnee 5e8597bf0a Added TokenisedRegularExpression for accurate parsing of class files for the manifest. To make it efficient, the parse results of each file are now cached.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52320 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-08 06:17:58 +00:00

101 lines
1.7 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
/* This is a comment before */
class MyClass extends Object {
}
/* This is a comment between */
class MyClass_Other extends DataObject implements Something {
}
class MyClass_Final extends DataObject implements Something, OtherClass {
}
/**
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 Something implements Else, Other {
}
PHP
,
'sapphire/subdir/SubDirClass.php',
'otherdir/',
'otherdir/OtherFile.php' => <<<PHP
<?php
class OtherFile extends Object {
}
PHP
,
);