removing duplicate code, cleanup of temporary test files

This commit is contained in:
El RIDO 2017-03-24 23:42:11 +01:00
parent 6db9dae66b
commit f7853cf439
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
6 changed files with 85 additions and 98 deletions

View file

@ -110,10 +110,6 @@ class FilesystemTest extends PHPUnit_Framework_TestCase
}
}
/**
* @expectedException Exception
* @expectedExceptionCode 90
*/
public function testErrorDetection()
{
$this->_model->delete(Helper::getPasteId());
@ -123,10 +119,6 @@ class FilesystemTest extends PHPUnit_Framework_TestCase
$this->assertFalse($this->_model->exists(Helper::getPasteId()), 'paste does still not exist');
}
/**
* @expectedException Exception
* @expectedExceptionCode 90
*/
public function testCommentErrorDetection()
{
$this->_model->delete(Helper::getPasteId());
@ -138,26 +130,4 @@ class FilesystemTest extends PHPUnit_Framework_TestCase
$this->assertFalse($this->_model->createComment(Helper::getPasteId(), Helper::getPasteId(), Helper::getCommentId(), $comment), 'unable to store broken comment');
$this->assertFalse($this->_model->existsComment(Helper::getPasteId(), Helper::getPasteId(), Helper::getCommentId()), 'comment does still not exist');
}
/**
* @expectedException Exception
* @expectedExceptionCode 10
*/
public function testPermissionShenanigans()
{
// try creating an invalid path
chmod($this->_invalidPath, 0000);
Filesystem::getInstance(array('dir' => $this->_invalidPath . DIRECTORY_SEPARATOR . 'baz'));
}
/**
* @expectedException Exception
* @expectedExceptionCode 11
*/
public function testPathShenanigans()
{
// try setting an invalid path
chmod($this->_invalidPath, 0000);
Filesystem::getInstance(array('dir' => $this->_invalidPath));
}
}