mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../../../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
|
|
|
|
class ControllerMoveCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|
{
|
|
protected $client;
|
|
protected static $need_records = 1;
|
|
|
|
public function createApplication()
|
|
{
|
|
return require __DIR__ . '/../../../../../lib/Alchemy/Phrasea/Application/Prod.php';
|
|
}
|
|
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
$this->client = $this->createClient();
|
|
}
|
|
|
|
/**
|
|
* Default route test
|
|
*/
|
|
public function testRouteSlash()
|
|
{
|
|
$this->client->request('POST', '/records/movecollection/', array('lst' => self::$record_1->get_serialize_key()));
|
|
|
|
$response = $this->client->getResponse();
|
|
|
|
$this->assertTrue($response->isOk());
|
|
}
|
|
|
|
public function testApply()
|
|
{
|
|
|
|
$this->client->request('POST', '/records/movecollection/apply/', array('lst' => self::$record_1->get_serialize_key(), 'base_id' => self::$collection->get_base_id()));
|
|
|
|
$response = $this->client->getResponse();
|
|
|
|
$this->assertTrue($response->isOk());
|
|
}
|
|
}
|