Add DataboxRepository

This commit is contained in:
Benoît Burnichon
2015-07-02 20:28:15 +02:00
parent fbfb61269f
commit 00f5f3369e
9 changed files with 239 additions and 156 deletions

View File

@@ -111,7 +111,8 @@ class DataboxTest extends \PhraseanetAuthenticatedWebTestCase
$this->setAdmin(true);
$collection = \collection::create(self::$DI['app'], $databox, self::$DI['app']['phraseanet.appbox'], 'TESTTODELETE');
$app = $this->getApplication();
$collection = \collection::create($app, $databox, $app['phraseanet.appbox'], 'TESTTODELETE');
$this->XMLHTTPRequest('POST', '/admin/databox/' . $databox->get_sbas_id() . '/collections/order/', [
'order' => [

View File

@@ -0,0 +1,39 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2015 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alchemy\Tests\Phrasea\Databox;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Databox\DataboxRepository;
use Alchemy\Phrasea\Databox\DataboxRepositoryInterface;
use Prophecy\Prophecy\ObjectProphecy;
final class DataboxRepositoryTest extends \PHPUnit_Framework_TestCase
{
/** @var ObjectProphecy */
private $app;
/** @var ObjectProphecy */
private $appbox;
/** @var DataboxRepository */
private $sut;
protected function setUp()
{
$this->app = $this->prophesize(Application::class);
$this->appbox = $this->prophesize(\appbox::class);
$this->sut = new DataboxRepository($this->app->reveal(), $this->appbox->reveal());
}
public function testItImplementsDataboxRepositoryInterface()
{
$this->assertInstanceOf(DataboxRepositoryInterface::class, $this->sut);
}
}