<?php
/*
 * Copyright (c) Ouzo contributors, http://ouzoframework.org
 * This file is made available under the MIT License (view the LICENSE file for more information).
 */
namespace Ouzo\Tests;

class MockDownloadHandler
{
    private $_fileName;

    public function downloadFile($fileData)
    {
        $this->_fileName = $fileData['label'];
        return $this;
    }

    public function streamMediaFile(array $fileData)
    {
        $this->_fileName = $fileData['label'];
        return $this;
    }

    public function getFileName()
    {
        return $this->_fileName;
    }
}

<?php
/*
 * Copyright (c) Ouzo contributors, http://ouzoframework.org
 * This file is made available under the MIT License (view the LICENSE file for more information).
 */

namespace Ouzo\Tests;

use Ouzo\Utilities\Arrays;

class MockDownloadHandler
{
    private $fileData;

    public function downloadFile($fileData)
    {
        $this->fileData = $fileData;
        return $this;
    }

    public function streamMediaFile(array $fileData)
    {
        $this->fileData = $fileData;
        return $this;
    }

    public function getFileName()
    {
        return Arrays::getValue($this->fileData, 'label');
    }

    public function getFileData()
    {
        return Arrays::getValue($this->fileData, 'data');
    }
}

Store complete data object inside mock.
Store complete data object inside mock.
