This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | class DMSEmbargoTest extends SapphireTest |
||
3 | { |
||
4 | protected static $fixture_file = 'dmsembargotest.yml'; |
||
5 | |||
6 | public function createFakeHTTPRequest($id) |
||
7 | { |
||
8 | $r = new SS_HTTPRequest('GET', 'index/'.$id); |
||
9 | $r->match('index/$ID'); |
||
10 | return $r; |
||
11 | } |
||
12 | |||
13 | public function testBasicEmbargo() |
||
14 | { |
||
15 | $oldTestMode = DMSDocument_Controller::$testMode; |
||
16 | Config::inst()->update('DMS', 'folder_name', 'assets/_unit-test-123'); |
||
17 | |||
18 | $doc = DMS::inst()->storeDocument('dms/tests/DMS-test-lorum-file.pdf'); |
||
19 | $doc->CanViewType = 'LoggedInUsers'; |
||
20 | $docID = $doc->write(); |
||
21 | |||
22 | //fake a request for a document |
||
23 | $controller = new DMSDocument_Controller(); |
||
24 | DMSDocument_Controller::$testMode = true; |
||
25 | $result = $controller->index($this->createFakeHTTPRequest($docID)); |
||
26 | $this->assertEquals($doc->getFullPath(), $result, 'Correct underlying file returned (in test mode)'); |
||
0 ignored issues
–
show
|
|||
27 | |||
28 | $doc->embargoIndefinitely(); |
||
29 | |||
30 | $this->logInWithPermission('ADMIN'); |
||
31 | $result = $controller->index($this->createFakeHTTPRequest($docID)); |
||
32 | $this->assertEquals($doc->getFullPath(), $result, 'Admins can still download embargoed files'); |
||
0 ignored issues
–
show
The method
assertEquals() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
33 | |||
34 | $this->logInWithPermission('random-user-group'); |
||
35 | $result = $controller->index($this->createFakeHTTPRequest($docID)); |
||
36 | $this->assertNotEquals( |
||
0 ignored issues
–
show
The method
assertNotEquals() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
37 | $doc->getFullPath(), |
||
38 | $result, |
||
39 | 'File no longer returned (in test mode) when switching to other user group' |
||
40 | ); |
||
41 | |||
42 | DMSDocument_Controller::$testMode = $oldTestMode; |
||
43 | DMSFilesystemTestHelper::delete('assets/_unit-test-123'); |
||
44 | } |
||
45 | |||
46 | public function testEmbargoIndefinitely() |
||
47 | { |
||
48 | $doc = new DMSDocument(); |
||
49 | $doc->Filename = "DMS-test-lorum-file.pdf"; |
||
50 | $doc->Folder = "tests"; |
||
51 | $doc->write(); |
||
52 | |||
53 | $doc->embargoIndefinitely(); |
||
54 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
55 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
56 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
57 | |||
58 | $doc->clearEmbargo(); |
||
59 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
60 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
61 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
62 | } |
||
63 | |||
64 | View Code Duplication | public function testExpireAtDate() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
65 | { |
||
66 | $doc = new DMSDocument(); |
||
67 | $doc->Filename = "DMS-test-lorum-file.pdf"; |
||
68 | $doc->Folder = "tests"; |
||
69 | $doc->write(); |
||
70 | |||
71 | $doc->expireAtDate(strtotime('-1 second')); |
||
72 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
73 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
74 | $this->assertTrue($doc->isExpired(), "Document is expired"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
75 | |||
76 | $expireTime = "2069-12-12 17:10:13"; |
||
77 | $doc->expireAtDate($expireTime); |
||
78 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
79 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
80 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
81 | |||
82 | SS_Datetime::set_mock_now($expireTime); |
||
83 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
84 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
85 | $this->assertTrue($doc->isExpired(), "Document is expired"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
86 | SS_Datetime::clear_mock_now(); |
||
87 | |||
88 | $doc->expireAtDate(strtotime('-1 second')); |
||
89 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
90 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
91 | $this->assertTrue($doc->isExpired(), "Document is expired"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
92 | |||
93 | $doc->clearExpiry(); |
||
94 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
95 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
96 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
97 | } |
||
98 | |||
99 | View Code Duplication | public function testEmbargoUntilDate() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
100 | { |
||
101 | $doc = new DMSDocument(); |
||
102 | $doc->Filename = "DMS-test-lorum-file.pdf"; |
||
103 | $doc->Folder = "tests"; |
||
104 | $doc->write(); |
||
105 | |||
106 | $doc->embargoUntilDate(strtotime('+1 minute')); |
||
107 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
108 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
109 | |||
110 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
111 | |||
112 | $doc->embargoUntilDate(strtotime('-1 second')); |
||
113 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
114 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
115 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
116 | |||
117 | $embargoTime = "2069-12-12 17:10:13"; |
||
118 | $doc->embargoUntilDate($embargoTime); |
||
119 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
120 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
121 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
122 | |||
123 | SS_Datetime::set_mock_now($embargoTime); |
||
124 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
125 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
126 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
127 | |||
128 | SS_Datetime::clear_mock_now(); |
||
129 | |||
130 | $doc->clearEmbargo(); |
||
131 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
132 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
133 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
134 | } |
||
135 | |||
136 | public function testEmbargoUntilPublished() |
||
137 | { |
||
138 | $s1 = $this->objFromFixture('SiteTree', 's1'); |
||
139 | |||
140 | $doc = new DMSDocument(); |
||
141 | $doc->Filename = "test file"; |
||
142 | $doc->Folder = "0"; |
||
143 | $dID = $doc->write(); |
||
144 | |||
145 | $s1->getDocumentSets()->first()->getDocuments()->add($doc); |
||
146 | |||
147 | $s1->publish('Stage', 'Live'); |
||
148 | $s1->doPublish(); |
||
149 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
150 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
151 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
152 | |||
153 | $doc->embargoUntilPublished(); |
||
154 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
155 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
156 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
157 | |||
158 | $s1->publish('Stage', 'Live'); |
||
159 | $s1->doPublish(); |
||
160 | $doc = DataObject::get_by_id("DMSDocument", $dID); |
||
161 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
162 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
163 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
164 | |||
165 | $doc->embargoUntilPublished(); |
||
166 | $doc = DataObject::get_by_id("DMSDocument", $dID); |
||
167 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
168 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
169 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
170 | |||
171 | $doc->embargoIndefinitely(); |
||
172 | $doc = DataObject::get_by_id("DMSDocument", $dID); |
||
173 | $this->assertTrue($doc->isHidden(), "Document is hidden"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
174 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
175 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
176 | |||
177 | $s1->publish('Stage', 'Live'); |
||
178 | $s1->doPublish(); |
||
179 | $doc = DataObject::get_by_id("DMSDocument", $dID); |
||
180 | $this->assertTrue( |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
181 | $doc->isHidden(), |
||
182 | "Document is still hidden because although the untilPublish flag is cleared, the indefinitely flag is there" |
||
183 | ); |
||
184 | $this->assertTrue($doc->isEmbargoed(), "Document is embargoed"); |
||
0 ignored issues
–
show
The method
assertTrue() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
185 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
186 | |||
187 | $doc->clearEmbargo(); |
||
188 | $doc = DataObject::get_by_id("DMSDocument", $dID); |
||
189 | $this->assertFalse($doc->isHidden(), "Document is not hidden"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
190 | $this->assertFalse($doc->isEmbargoed(), "Document is not embargoed"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
191 | $this->assertFalse($doc->isExpired(), "Document is not expired"); |
||
0 ignored issues
–
show
The method
assertFalse() does not seem to exist on object<DMSEmbargoTest> .
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. ![]() |
|||
192 | } |
||
193 | } |
||
194 |
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.