$this->recordIds['newCategoryId'] = $newTableIds[self::TABLE_Category][0];
}
+ public function createContentWithCategoryAndAddRelation()
+ {
+ $newTableIds = $this->actionService->createNewRecords(
+ self::VALUE_PageId,
+ array(
+ self::TABLE_Category => array('pid' => 0, 'title' => 'Testing #1'),
+ self::TABLE_Content => array('header' => 'Testing #1'),
+ )
+ );
+ $this->recordIds['newCategoryId'] = $newTableIds[self::TABLE_Category][0];
+ $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][0];
+
+ $this->actionService->modifyRecord(
+ self::TABLE_Content, $this->recordIds['newContentId'], array('categories' => $this->recordIds['newCategoryId'])
+ );
+ }
+
+ public function createCategoryWithContentAndAddRelation()
+ {
+ $newTableIds = $this->actionService->createNewRecords(
+ self::VALUE_PageId,
+ array(
+ self::TABLE_Content => array('header' => 'Testing #1'),
+ self::TABLE_Category => array('pid' => 0, 'title' => 'Testing #1', 'items' => 'tt_content___previousUid'),
+ )
+ );
+ $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][0];
+ $this->recordIds['newCategoryId'] = $newTableIds[self::TABLE_Category][0];
+
+ $this->actionService->modifyRecord(
+ self::TABLE_Category, $this->recordIds['newCategoryId'], array('items' => 'tt_content_' . $this->recordIds['newContentId'])
+ );
+ }
+
/**
* @see DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv
*/
/**
* @test
+ * @see DataSet/createContentWCategoryNAddRelation.csv
+ */
+ public function createContentWithCategoryAndAddRelation()
+ {
+ parent::createContentWithCategoryAndAddRelation();
+ $this->assertAssertionDataSet('createContentWCategoryNAddRelation');
+ }
+
+ /**
+ * @test
+ * @see DataSet/createCategoryWContentNAddRelation.csv
+ */
+ public function createCategoryWithContentAndAddRelation()
+ {
+ parent::createCategoryWithContentAndAddRelation();
+ $this->assertAssertionDataSet('createCategoryWContentNAddRelation');
+ }
+
+ /**
+ * @test
* @see DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv
*/
public function modifyCategoryOfRelation()
--- /dev/null
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,1,1,0,0,0,"Testing #1",0,0
+,33,-1,128,0,0,0,1,-1,0,32,0,"Testing #1",0,1
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,33,299,tt_content,1,0,categories
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",0,2
+,299,89,128,0,0,0,1,1,0,0,0,"Testing #1",0,0
+,300,-1,128,0,0,0,1,-1,0,299,0,"Testing #1",0,0
--- /dev/null
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,1,1,0,0,0,"Testing #1",0,0
+,33,-1,128,0,0,0,1,-1,0,32,0,"Testing #1",0,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,32,300,tt_content,0,1,categories
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",0,2
+,299,89,128,0,0,0,1,1,0,0,0,"Testing #1",0,0
+,300,-1,128,0,0,0,1,-1,0,299,0,"Testing #1",0,1
/**
* @test
+ * @see DataSet/createContentWCategoryNAddRelation.csv
+ */
+ public function createContentWithCategoryAndAddRelation()
+ {
+ parent::createContentWithCategoryAndAddRelation();
+ $this->actionService->publishRecords(
+ array(
+ self::TABLE_Category => array($this->recordIds['newCategoryId']),
+ self::TABLE_Content => array($this->recordIds['newContentId']),
+ )
+ );
+ $this->assertAssertionDataSet('createContentWCategoryNAddRelation');
+ }
+
+ /**
+ * @test
+ * @see DataSet/createCategoryWContentNAddRelation.csv
+ */
+ public function createCategoryWithContentAndAddRelation()
+ {
+ parent::createCategoryWithContentAndAddRelation();
+ $this->actionService->publishRecords(
+ array(
+ self::TABLE_Content => array($this->recordIds['newContentId']),
+ self::TABLE_Category => array($this->recordIds['newCategoryId']),
+ )
+ );
+ $this->assertAssertionDataSet('createCategoryWContentNAddRelation');
+ }
+
+ /**
+ * @test
* @see DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv
*/
public function modifyCategoryOfRelation()
--- /dev/null
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,0,0,0,0,0,"Testing #1",0,1
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,32,300,tt_content,1,0,categories
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",0,2
+,299,89,128,0,0,0,0,0,0,0,0,"Testing #1",0,0
--- /dev/null
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,0,0,0,0,0,"Testing #1",0,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,33,299,tt_content,0,1,categories
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",0,2
+,299,89,128,0,0,0,0,0,0,0,0,"Testing #1",0,1
/**
* @test
+ * @see DataSet/createContentWCategoryNAddRelation.csv
+ */
+ public function createContentWithCategoryAndAddRelation()
+ {
+ parent::createContentWithCategoryAndAddRelation();
+ $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+ $this->assertAssertionDataSet('createContentWCategoryNAddRelation');
+ }
+
+ /**
+ * @test
+ * @see DataSet/createCategoryWContentNAddRelation.csv
+ */
+ public function createCategoryWithContentAndAddRelation()
+ {
+ parent::createCategoryWithContentAndAddRelation();
+ $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
+ $this->assertAssertionDataSet('createCategoryWContentNAddRelation');
+ }
+
+ /**
+ * @test
* @see DataSet/Assertion/modifyCategoryRecordOfCategoryRelation.csv
*/
public function modifyCategoryOfRelation()
--- /dev/null
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,0,0,0,0,0,"Testing #1",0,1
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,32,300,tt_content,1,0,categories
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",0,2
+,299,89,128,0,0,0,0,0,0,0,0,"Testing #1",0,0
--- /dev/null
+sys_category
+,uid,pid,sorting,deleted,sys_language_uid,l10n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parent,items
+,28,0,256,0,0,0,0,0,0,0,0,"Category A",0,0
+,29,0,512,0,0,0,0,0,0,0,0,"Category B",0,0
+,30,0,768,0,0,0,0,0,0,0,0,"Category C",0,0
+,31,0,1024,0,0,0,0,0,0,0,0,"Category A.A",28,0
+,32,0,128,0,0,0,0,0,0,0,0,"Testing #1",0,0
+sys_category_record_mm
+,uid_local,uid_foreign,tablenames,sorting,sorting_foreign,fieldname
+,28,297,tt_content,0,1,categories
+,29,297,tt_content,0,2,categories
+,29,298,tt_content,0,1,categories
+,30,298,tt_content,0,2,categories
+,33,299,tt_content,0,1,categories
+tt_content
+,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image,categories
+,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",0,2
+,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",0,2
+,299,89,128,0,0,0,0,0,0,0,0,"Testing #1",0,1