summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 01:59:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 22:52:27 +0200
commit4637dcc4587ed0c3b1695568a3c8a3853d695c5d (patch)
treee1778a3ddbaa95568ab90c211d49925f4946d157 /tests
parent6d365e8083ecf67212203fe86fd1e1bf2b4ac281 (diff)
migrate security annotations, please review
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/api/FeedAPITest.php7
-rw-r--r--tests/unit/api/FolderAPITest.php3
-rw-r--r--tests/unit/api/ItemAPITest.php3
-rw-r--r--tests/unit/api/NewsAPITest.php10
-rw-r--r--tests/unit/controller/ExportControllerTest.php6
-rw-r--r--tests/unit/controller/FeedControllerTest.php2
-rw-r--r--tests/unit/controller/FolderControllerTest.php2
-rw-r--r--tests/unit/controller/ItemControllerTest.php2
-rw-r--r--tests/unit/controller/PageControllerTest.php3
-rw-r--r--tests/unit/controller/UserSettingsControllerTest.php2
10 files changed, 16 insertions, 24 deletions
diff --git a/tests/unit/api/FeedAPITest.php b/tests/unit/api/FeedAPITest.php
index 03dd762cb..935b5214b 100644
--- a/tests/unit/api/FeedAPITest.php
+++ b/tests/unit/api/FeedAPITest.php
@@ -84,8 +84,7 @@ class FeedAPITest extends ControllerTestUtility {
private function assertDefaultAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired', 'API');
$this->assertAnnotations($this->feedAPI, $methodName, $annotations);
}
@@ -116,13 +115,13 @@ class FeedAPITest extends ControllerTestUtility {
public function testGetAllFromUsersAnnotations(){
- $annotations = array('Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoCSRFRequired', 'API');
$this->assertAnnotations($this->feedAPI, 'getAllFromAllUsers', $annotations);
}
public function testUpdateAnnotations(){
- $annotations = array('Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoCSRFRequired', 'API');
$this->assertAnnotations($this->feedAPI, 'update', $annotations);
}
diff --git a/tests/unit/api/FolderAPITest.php b/tests/unit/api/FolderAPITest.php
index 843ac004f..c835e4722 100644
--- a/tests/unit/api/FolderAPITest.php
+++ b/tests/unit/api/FolderAPITest.php
@@ -80,8 +80,7 @@ class FolderAPITest extends ControllerTestUtility {
private function assertDefaultAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired', 'API');
$this->assertAnnotations($this->folderAPI, $methodName, $annotations);
}
diff --git a/tests/unit/api/ItemAPITest.php b/tests/unit/api/ItemAPITest.php
index 5bbf7edf1..4c44e37f2 100644
--- a/tests/unit/api/ItemAPITest.php
+++ b/tests/unit/api/ItemAPITest.php
@@ -69,8 +69,7 @@ class ItemAPITest extends ControllerTestUtility {
private function assertDefaultAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired', 'API');
$this->assertAnnotations($this->itemAPI, $methodName, $annotations);
}
diff --git a/tests/unit/api/NewsAPITest.php b/tests/unit/api/NewsAPITest.php
index 9fa467913..f0aaf2411 100644
--- a/tests/unit/api/NewsAPITest.php
+++ b/tests/unit/api/NewsAPITest.php
@@ -59,8 +59,7 @@ class NewsAPITest extends ControllerTestUtility {
private function assertDefaultAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired', 'API');
$this->assertAnnotations($this->newsAPI, $methodName, $annotations);
}
@@ -69,12 +68,12 @@ class NewsAPITest extends ControllerTestUtility {
}
public function testBeforeUpdateAnnotations(){
- $annotations = array('Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoCSRFRequired', 'API');
$this->assertAnnotations($this->newsAPI, 'beforeUpdate', $annotations);
}
public function testAfterUpdateAnnotations(){
- $annotations = array('Ajax', 'CSRFExemption', 'API');
+ $annotations = array('NoCSRFRequired', 'API');
$this->assertAnnotations($this->newsAPI, 'afterUpdate', $annotations);
}
@@ -109,8 +108,7 @@ class NewsAPITest extends ControllerTestUtility {
public function testCorsAnnotations(){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'Ajax', 'CSRFExemption', 'IsLoggedInExemption');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired', 'PublicPage');
$this->assertAnnotations($this->newsAPI, 'cors', $annotations);
}
diff --git a/tests/unit/controller/ExportControllerTest.php b/tests/unit/controller/ExportControllerTest.php
index 0970993ca..b79574ff2 100644
--- a/tests/unit/controller/ExportControllerTest.php
+++ b/tests/unit/controller/ExportControllerTest.php
@@ -73,15 +73,13 @@ class ExportControllerTest extends ControllerTestUtility {
public function testOpmlAnnotations(){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'CSRFExemption');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired');
$this->assertAnnotations($this->controller, 'opml', $annotations);
}
public function testArticlesAnnotations(){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'CSRFExemption');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired');
$this->assertAnnotations($this->controller, 'articles', $annotations);
}
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php
index 899cebfc0..ac7b998cb 100644
--- a/tests/unit/controller/FeedControllerTest.php
+++ b/tests/unit/controller/FeedControllerTest.php
@@ -71,7 +71,7 @@ class FeedControllerTest extends ControllerTestUtility {
}
private function assertFeedControllerAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax');
+ $annotations = array('NoAdminRequired');
$this->assertAnnotations($this->controller, $methodName, $annotations);
}
diff --git a/tests/unit/controller/FolderControllerTest.php b/tests/unit/controller/FolderControllerTest.php
index 12a9078ea..a26fc3151 100644
--- a/tests/unit/controller/FolderControllerTest.php
+++ b/tests/unit/controller/FolderControllerTest.php
@@ -75,7 +75,7 @@ class FolderControllerTest extends ControllerTestUtility {
private function assertFolderControllerAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax');
+ $annotations = array('NoAdminRequired');
$this->assertAnnotations($this->controller, $methodName, $annotations);
}
diff --git a/tests/unit/controller/ItemControllerTest.php b/tests/unit/controller/ItemControllerTest.php
index 14c1a3fa4..8089ed2f1 100644
--- a/tests/unit/controller/ItemControllerTest.php
+++ b/tests/unit/controller/ItemControllerTest.php
@@ -81,7 +81,7 @@ class ItemControllerTest extends ControllerTestUtility {
private function assertItemControllerAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax');
+ $annotations = array('NoAdminRequired');
$this->assertAnnotations($this->controller, $methodName, $annotations);
}
diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php
index d2cd4b8af..86534e861 100644
--- a/tests/unit/controller/PageControllerTest.php
+++ b/tests/unit/controller/PageControllerTest.php
@@ -51,8 +51,7 @@ class PageControllerTest extends ControllerTestUtility {
public function testOpmlAnnotations(){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption',
- 'CSRFExemption');
+ $annotations = array('NoAdminRequired', 'NoCSRFRequired');
$this->assertAnnotations($this->controller, 'index', $annotations);
}
diff --git a/tests/unit/controller/UserSettingsControllerTest.php b/tests/unit/controller/UserSettingsControllerTest.php
index 9a8dcf5fd..87a898376 100644
--- a/tests/unit/controller/UserSettingsControllerTest.php
+++ b/tests/unit/controller/UserSettingsControllerTest.php
@@ -52,7 +52,7 @@ class UserSettingsControllerTest extends ControllerTestUtility {
private function assertUserSettingsControllerAnnotations($methodName){
- $annotations = array('IsAdminExemption', 'IsSubAdminExemption', 'Ajax');
+ $annotations = array('NoAdminRequired');
$this->assertAnnotations($this->controller, $methodName, $annotations);
}