Eric Lippmann 5fa2e3cfdc Revert "Add license header"
This reverts commit 338d067aba41dd6e9178cebec5433eecd614196e.
2015-02-03 16:16:26 +01:00

30 lines
662 B
PHP

<?php
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
namespace Tests\Icinga\Util;
use Icinga\Util\File;
use Icinga\Test\BaseTestCase;
class FileTest extends BaseTestCase
{
/**
* @expectedException \Icinga\Exception\NotWritableError
*/
public function testWhetherWritingToNonWritableFilesThrowsAnException()
{
$file = new File('/dev/null');
$file->fwrite('test');
}
/**
* @expectedException \Icinga\Exception\NotWritableError
*/
public function testWhetherTruncatingNonWritableFilesThrowsAnException()
{
$file = new File('/dev/null');
$file->ftruncate(0);
}
}