Conditions | 1 |
Paths | 1 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
6 | public function testFindInRate() |
||
7 | { |
||
8 | Config::inst()->update('DMS', 'shortcode_handler_key', 'dms_document_link'); |
||
9 | |||
10 | $d1 = $this->objFromFixture('DMSDocument', 'd1'); |
||
11 | $d2 = $this->objFromFixture('DMSDocument', 'd2'); |
||
12 | |||
13 | $page1 = new SiteTree(); |
||
14 | $page1->Content = 'Condition: <a title="document test 1" href="[dms_document_link,id=' . $d1->ID . ']">'; |
||
15 | $page1ID = $page1->write(); |
||
16 | |||
17 | $page2 = new SiteTree(); |
||
18 | $page2->Content = 'Condition: <a title="document test 2" href="[dms_document_link,id=' . $d2->ID . ']">'; |
||
19 | $page2ID = $page2->write(); |
||
20 | |||
21 | $page3 = new SiteTree(); |
||
22 | $page3->Content = 'Condition: <a title="document test 1" href="[dms_document_link,id=' . $d1->ID . ']">'; |
||
23 | $page3ID = $page3->write(); |
||
24 | |||
25 | $finder = new ShortCodeRelationFinder(); |
||
26 | |||
27 | $ids = $finder->findPageIDs('UnknownShortcode'); |
||
28 | $this->assertEquals(0, count($ids)); |
||
|
|||
29 | |||
30 | $ids = $finder->findPageIDs($d1->ID); |
||
31 | $this->assertNotContains($page2ID, $ids); |
||
32 | $this->assertContains($page1ID, $ids); |
||
33 | $this->assertContains($page3ID, $ids); |
||
34 | } |
||
35 | } |
||
36 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.