a7395a366691e91e499a5a5c86713637879ca849
Author: Mark Story
Date: 2009-02-04 22:01:15 -0500
diff --git a/tests/cases/models/api_class.test.php b/tests/cases/models/api_class.test.php
index 86cd4a2..95fedf8 100644
--- a/tests/cases/models/api_class.test.php
+++ b/tests/cases/models/api_class.test.php
@@ -137,8 +137,8 @@ class ApiFileTestCase extends CakeTestCase {
'name' => 'ApiClassSampleClass',
'slug' => 'api-class-sample-class',
'file_name' => __FILE__,
- 'search_index' => 'apiclasssampleclass doc block foo property test function in sample class first parameter second parameter non-extended method',
-
+ 'property_index' => 'foo',
+ 'method_index' => 'testfunct extended',
'flags' => 0,
'created' => $now,
'modified' => $now,
@@ -157,7 +157,8 @@ class ApiFileTestCase extends CakeTestCase {
'name' => 'ApiClassSampleClassChild',
'slug' => 'api-class-sample-class-child',
'file_name' => __FILE__,
- 'search_index' => 'apiclasssampleclass doc block onlyme primary function extended-method this time',
+ 'property_index' => 'onlyme',
+ 'method_index' => 'primary extended',
'flags' => 0,
'created' => $now,
'modified' => $now,
@@ -165,4 +166,17 @@ class ApiFileTestCase extends CakeTestCase {
);
$this->assertEqual($result, $expected);
}
+/**
+ * test Saving of pseudo classes
+ *
+ * @return void
+ **/
+ function testSavePseudoClassDocs() {
+ $file = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'basics.php';
+ $ApiFile = ClassRegistry::init('ApiGenerator.ApiFile');
+ $docs = $ApiFile->loadFile($file);
+
+ $result = $this->ApiClass->savePseudoClassDocs($docs['function'], $file);
+ $this->assertTrue($result);
+ }
}
\ No newline at end of file
diff --git a/tests/fixtures/api_class_fixture.php b/tests/fixtures/api_class_fixture.php
index 1743e44..a643287 100644
--- a/tests/fixtures/api_class_fixture.php
+++ b/tests/fixtures/api_class_fixture.php
@@ -7,7 +7,8 @@ class ApiClassFixture extends CakeTestFixture {
'name' => array('type' => 'string', 'length' => 200, 'null' => false),
'slug' => array('type' => 'string', 'length' => 200, 'null' => false),
'file_name' => array('type' => 'text'),
- 'search_index' => array('type' => 'text'),
+ 'method_index' => array('type' => 'text'),
+ 'property_index' => array('type' => 'text'),
'flags' => array('type' => 'integer', 'default' => 0, 'length' => 5),
'created' => array('type' => 'datetime'),
'modified' => array('type' => 'datetime'),
