Removed obsolete method in InputReader
This commit is contained in:
parent
01a84ee4e2
commit
116522498d
2 changed files with 0 additions and 31 deletions
|
@ -25,16 +25,6 @@ final class InputReader extends \ArrayObject
|
||||||
return parent::offsetGet($index);
|
return parent::offsetGet($index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function decodeBase64($base64string)
|
|
||||||
{
|
|
||||||
if ($base64string === null)
|
|
||||||
return null;
|
|
||||||
$commaPosition = strpos($base64string, ',');
|
|
||||||
if ($commaPosition !== null)
|
|
||||||
$base64string = substr($base64string, $commaPosition + 1);
|
|
||||||
return base64_decode($base64string);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function readFile($fileName)
|
public function readFile($fileName)
|
||||||
{
|
{
|
||||||
if (!isset($_FILES[$fileName]))
|
if (!isset($_FILES[$fileName]))
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Szurubooru\Tests\Helpers;
|
|
||||||
use Szurubooru\Helpers\InputReader;
|
|
||||||
use Szurubooru\Tests\AbstractTestCase;
|
|
||||||
|
|
||||||
final class InputReaderTest extends AbstractTestCase
|
|
||||||
{
|
|
||||||
public function testDecodingBase64()
|
|
||||||
{
|
|
||||||
$inputReader = new InputReader();
|
|
||||||
$actual = $inputReader->decodeBase64('data:text/plain,YXdlc29tZSBkb2c=');
|
|
||||||
$expected = 'awesome dog';
|
|
||||||
$this->assertEquals($expected, $actual);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testDecodingEmptyBase64()
|
|
||||||
{
|
|
||||||
$inputReader = new InputReader();
|
|
||||||
$this->assertNull($inputReader->decodeBase64($inputReader->iDontEvenExist));
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue