Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initialized galleries test

  • Loading branch information...
commit 7ac2da9f7fe3eae3b26cfad15a5117323904d228 1 parent 7ed9a68
@marcoraddatz authored
Showing with 24 additions and 2 deletions.
  1. +9 −1 CandyControllerTestCase.php
  2. +15 −1 core/controllers/GalleriesTest.php
View
10 CandyControllerTestCase.php
@@ -102,7 +102,7 @@ protected function tearDown() {
protected function createFile($sPath) {
$sFile = PATH_STANDARD . '/' . $sPath . '/test_generated.log';
$oFile = fopen($sFile, 'a');
- fwrite($oFile, 'Is writeable.' . "\n");
+ fwrite($oFile, 'Is writeable.');
fclose($oFile);
return $sFile;
@@ -111,6 +111,14 @@ protected function createFile($sPath) {
/*
*
*/
+ protected function readFile($sPath) {
+ $this->open(WEBSITE_URL . '/' . $sPath . '/test_generated.log');
+ $this->verifyTextPresent('Is writeable.');
+ }
+
+ /*
+ *
+ */
protected function removeFile($sPath) {
return unlink(PATH_STANDARD . '/' . $sPath . '/test_generated.log');
}
View
16 core/controllers/GalleriesTest.php
@@ -83,14 +83,28 @@ public function testShowRSS() {
}
public function testCreateFile() {
+ $this->open(WEBSITE_URL . '/' . $this->aRequest['controller'] . '/createfile');
+ $this->verifyTextPresent(I18n::get('error.401.title'));
+ $this->open(WEBSITE_URL . '/' . $this->aRequest['controller'] . '/1/createfile');
+ $this->verifyTextPresent(I18n::get('error.401.title'));
+
+ parent::readFile('upload/galleries');
+
+ # @todo test that files are not readable except direct access
}
public function testUpdateFile() {
-
+ $this->open(WEBSITE_URL . '/' . $this->aRequest['controller'] . '/updatefile');
+ $this->verifyTextPresent(I18n::get('error.401.title'));
}
public function testDestroyFile() {
+ $this->open(WEBSITE_URL . '/' . $this->aRequest['controller'] . '/destroyfile');
+ $this->verifyTextPresent(I18n::get('error.401.title'));
+ }
+
+ public function testUpdateOrder() {
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.