szurubooru/tests/Helpers/InputReaderTest.php

20 lines
545 B
PHP
Raw Normal View History

2014-09-15 11:38:24 +02:00
<?php
namespace Szurubooru\Tests\Helpers;
class InputReaderTest extends \Szurubooru\Tests\AbstractTestCase
{
public function testDecodingBase64()
{
$inputReader = new \Szurubooru\Helpers\InputReader();
$actual = $inputReader->decodeBase64('data:text/plain,YXdlc29tZSBkb2c=');
$expected = 'awesome dog';
$this->assertEquals($expected, $actual);
}
public function testDecodingEmptyBase64()
{
$inputReader = new \Szurubooru\Helpers\InputReader();
$this->assertNull($inputReader->decodeBase64($inputReader->iDontEvenExist));
}
2014-09-15 11:38:24 +02:00
}