mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
Fix unit tests metadatas
This commit is contained in:
@@ -28,7 +28,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testGet_error_code()
|
||||
{
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_error_code($request, 400);
|
||||
$result = $this->object->get_error_code($request, 400);
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
@@ -62,7 +62,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testGet_error_message()
|
||||
{
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_error_message($request, API_V1_result::ERROR_BAD_REQUEST);
|
||||
$result = $this->object->get_error_message($request, API_V1_result::ERROR_BAD_REQUEST);
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
@@ -101,7 +101,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testGet_databoxes()
|
||||
{
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_databoxes($request);
|
||||
$result = $this->object->get_databoxes($request);
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -109,7 +109,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testGet_databox_collections()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance();
|
||||
$request = new Request();
|
||||
foreach ($appbox->get_databoxes() as $databox)
|
||||
{
|
||||
@@ -125,11 +125,11 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_record($request, self::$record_1->get_sbas_id(), "-40");
|
||||
$result = $this->object->get_record($request, self::$record_1->get_sbas_id(), "-40");
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_record($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $this->object->get_record($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -137,7 +137,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testGet_databox_status()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance();
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
foreach ($appbox->get_databoxes() as $databox)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testGet_databox_metadatas()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance();
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
foreach ($appbox->get_databoxes() as $databox)
|
||||
{
|
||||
@@ -163,7 +163,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testGet_databox_terms()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance();
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
foreach ($appbox->get_databoxes() as $databox)
|
||||
{
|
||||
@@ -177,7 +177,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSearch_records()
|
||||
{
|
||||
$request = new Request(array('record_type' => "image"), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->search_records($request);
|
||||
$result = $this->object->search_records($request);
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -188,7 +188,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_record_related($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $this->object->get_record_related($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -199,7 +199,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_record_metadatas($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $this->object->get_record_metadatas($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -211,7 +211,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
$request = new Request();
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_record_status($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $this->object->get_record_status($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -222,7 +222,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_record_embed($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $this->object->get_record_embed($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -230,44 +230,53 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testSet_record_metadatas()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance();
|
||||
$databox = self::$record_1->get_databox();
|
||||
$request = new Request(array("salut" => "salut c'est la fete"), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->set_record_metadatas($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $this->object->set_record_metadatas($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
|
||||
$request = new Request(array("metadatas" => "salut c'est la fete"), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$this->object->set_record_metadatas($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
|
||||
if(sizeof(self::$record_1->get_caption()->get_fields()) == 0)
|
||||
if (sizeof(self::$record_1->get_caption()->get_fields()) == 0)
|
||||
{
|
||||
$caption_field_value = caption_Field_Value::create(databox_field::get_instance($databox, 1), self::$record_1, 'my value');
|
||||
}
|
||||
|
||||
//valide metas
|
||||
$metadatas = array();
|
||||
foreach (self::$record_1->get_caption()->get_fields() as $field)
|
||||
|
||||
foreach (self::$record_1->get_databox()->get_meta_structure()->get_elements() as $field)
|
||||
{
|
||||
$values = $field->get_values();
|
||||
foreach($values as $value)
|
||||
try
|
||||
{
|
||||
$metadatas[] = array(
|
||||
'meta_id' => $value->getId()
|
||||
, 'meta_struct_id' => $field->get_meta_struct_id()
|
||||
, 'value' => $value->getValue()
|
||||
);
|
||||
$values = self::$record_1->get_caption()->get_field($field->get_name())->get_values();
|
||||
$value = array_pop($values);
|
||||
$meta_id = $value->getId();
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$meta_id = null;
|
||||
}
|
||||
|
||||
$metadatas[] = array(
|
||||
'meta_id' => $meta_id
|
||||
, 'meta_struct_id' => $field->get_id()
|
||||
, 'value' => 'podom pom pom ' . $field->get_id()
|
||||
);
|
||||
}
|
||||
|
||||
$metadatas = array_shift($metadatas);
|
||||
$metadatas = array_shift($metadatas);
|
||||
$metadatas["value"] = "new_value";
|
||||
|
||||
|
||||
$request = new Request(array("metadatas" => array($metadatas)), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
|
||||
$result = $this->object->set_record_metadatas($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
|
||||
$response = json_decode($result->format());
|
||||
|
||||
$this->checkResponseField($result, "metadatas", PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT);
|
||||
}
|
||||
|
||||
@@ -277,8 +286,8 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSet_record_status()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$stub = $this->getMock("API_V1_adapter", array("list_record_status"), array(false, &$appbox, bootstrap::getCore()));
|
||||
$appbox = appbox::get_instance();
|
||||
$stub = $this->getMock("API_V1_adapter", array("list_record_status"), array(false, &$appbox, bootstrap::getCore()));
|
||||
$appbox = appbox::get_instance();
|
||||
$databox = self::$record_1->get_databox();
|
||||
|
||||
$statusbit = null;
|
||||
@@ -289,7 +298,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
}
|
||||
|
||||
$request = new Request(array("salut" => "salut c'est la fete"), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $stub->set_record_status($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $stub->set_record_status($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
|
||||
$request = new Request(array("status" => "salut c'est la fete"), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
@@ -301,10 +310,10 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$request = new Request(array("status" => $status), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
//check method use record->get_caption
|
||||
$stub->expects($this->once())
|
||||
->method("list_record_status")
|
||||
->will($this->returnValue(new stdClass()));
|
||||
->method("list_record_status")
|
||||
->will($this->returnValue(new stdClass()));
|
||||
//check for metadas fiels in response
|
||||
$result = $stub->set_record_status($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $stub->set_record_status($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->checkResponseField($result, "status", PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT);
|
||||
}
|
||||
|
||||
@@ -314,11 +323,11 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSet_record_collection()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$stub = $this->getMock("API_V1_adapter", array("list_record"), array(false, &$appbox, bootstrap::getCore()));
|
||||
$stub = $this->getMock("API_V1_adapter", array("list_record"), array(false, &$appbox, bootstrap::getCore()));
|
||||
$databox = self::$record_1->get_databox();
|
||||
|
||||
$request = new Request(array("salut" => "salut c'est la fete"), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $stub->set_record_collection($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $stub->set_record_collection($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->assertEquals(400, $result->get_http_code());
|
||||
|
||||
foreach ($appbox->get_databoxes() as $databox)
|
||||
@@ -332,10 +341,10 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$request = new Request(array("base_id" => $collection->get_base_id()), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
//check method use record->get_caption
|
||||
$stub->expects($this->once())
|
||||
->method("list_record")
|
||||
->will($this->returnValue(new stdClass()));
|
||||
->method("list_record")
|
||||
->will($this->returnValue(new stdClass()));
|
||||
//check for metadas fiels in response
|
||||
$result = $stub->set_record_collection($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$result = $stub->set_record_collection($request, self::$record_1->get_sbas_id(), self::$record_1->get_record_id());
|
||||
$this->checkResponseField($result, "record", PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT);
|
||||
}
|
||||
|
||||
@@ -346,14 +355,14 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
public function testSearch_baskets()
|
||||
{
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->search_baskets($request);
|
||||
$result = $this->object->search_baskets($request);
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -362,7 +371,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testCreate_basket()
|
||||
{
|
||||
$request = new Request(array(), array(), array('name' => 'BIG BASKET'), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->create_basket($request);
|
||||
$result = $this->object->create_basket($request);
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -374,11 +383,11 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
}
|
||||
|
||||
$this->assertEquals(1, $n);
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
$usr_id = $session->get_usr_id();
|
||||
$usr_id = $session->get_usr_id();
|
||||
|
||||
$em = self::$core->getEntityManager();
|
||||
$em = self::$core->getEntityManager();
|
||||
$repo = $em->getRepository('\Entities\Basket');
|
||||
|
||||
/* @var $repo \Repositories\BasketRepository */
|
||||
@@ -393,7 +402,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$usr_id = $appbox->get_session()->get_usr_id();
|
||||
$user = User_Adapter::getInstance($usr_id, $appbox);
|
||||
$user = User_Adapter::getInstance($usr_id, $appbox);
|
||||
|
||||
$em = self::$core->getEntityManager();
|
||||
|
||||
@@ -407,7 +416,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$ssel_id = $Basket->getId();
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->delete_basket($request, $ssel_id);
|
||||
$result = $this->object->delete_basket($request, $ssel_id);
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -433,7 +442,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->get_basket($request, $basket->getId());
|
||||
$result = $this->object->get_basket($request, $basket->getId());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
@@ -447,12 +456,12 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$request = new Request(array(), array(), array('name' => 'PROUTO'), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->set_basket_title($request, $basket->getId());
|
||||
$result = $this->object->set_basket_title($request, $basket->getId());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
|
||||
$repository =self::$core->getEntityManager()->getRepository('\Entities\Basket');
|
||||
$repository = self::$core->getEntityManager()->getRepository('\Entities\Basket');
|
||||
|
||||
$ret_bask = $repository->find($basket->getId());
|
||||
|
||||
@@ -467,12 +476,12 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$request = new Request(array(), array(), array('description' => 'une belle description'), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$result = $this->object->set_basket_description($request, $basket->getId());
|
||||
$result = $this->object->set_basket_description($request, $basket->getId());
|
||||
$this->assertEquals(200, $result->get_http_code());
|
||||
$this->assertEquals('application/json', $result->get_content_type());
|
||||
$this->assertTrue(is_object(json_decode($result->format())));
|
||||
|
||||
$repository =self::$core->getEntityManager()->getRepository('\Entities\Basket');
|
||||
$repository = self::$core->getEntityManager()->getRepository('\Entities\Basket');
|
||||
|
||||
$ret_bask = $repository->find($basket->getId());
|
||||
|
||||
@@ -482,10 +491,10 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSearch_publications()
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$stub = $this->getMock("API_V1_adapter", array("list_publication"), array(false, &$appbox, bootstrap::getCore()));
|
||||
$stub = $this->getMock("API_V1_adapter", array("list_publication"), array(false, &$appbox, bootstrap::getCore()));
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$feed = Feed_Adapter::create($appbox, self::$user, "hello", "salut");
|
||||
$result = $this->object->search_publications($request, self::$user);
|
||||
$feed = Feed_Adapter::create($appbox, self::$user, "hello", "salut");
|
||||
$result = $this->object->search_publications($request, self::$user);
|
||||
$this->checkResponseField($result, "feeds", PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT);
|
||||
$feed->delete();
|
||||
}
|
||||
@@ -494,7 +503,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -502,13 +511,13 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
|
||||
$date = new DateTime();
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$feed = Feed_Adapter::create($appbox, self::$user, "hello", "salut");
|
||||
$feed_publisher = Feed_Publisher_Adapter::getPublisher($appbox, $feed, self::$user);
|
||||
$feed_entry = Feed_Entry_Adapter::create($appbox, $feed, $feed_publisher, "coucou", "hello", "me", "my@email.com");
|
||||
$date = new DateTime();
|
||||
$request = new Request(array(), array(), array(), array(), array(), array('HTTP_Accept' => 'application/json'));
|
||||
$feed = Feed_Adapter::create($appbox, self::$user, "hello", "salut");
|
||||
$feed_publisher = Feed_Publisher_Adapter::getPublisher($appbox, $feed, self::$user);
|
||||
$feed_entry = Feed_Entry_Adapter::create($appbox, $feed, $feed_publisher, "coucou", "hello", "me", "my@email.com");
|
||||
$feed_entry_item = Feed_Entry_Item::create($appbox, $feed_entry, self::$record_1);
|
||||
$coll = Feed_Collection::load_all($appbox, self::$user);
|
||||
$coll = Feed_Collection::load_all($appbox, self::$user);
|
||||
foreach ($coll->get_feeds() as $feed)
|
||||
{
|
||||
$result = $this->object->get_publication($request, $feed->get_id(), self::$user);
|
||||
@@ -524,7 +533,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -532,7 +541,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -540,7 +549,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user