Exemple #1
0
 /**
  * @test
  * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecordAndDiscardModifiedParentRecord.csv
  */
 public function modifyParentWithHotelChildAndDiscardModifiedParent()
 {
     parent::modifyParentWithHotelChildAndDiscardModifiedParent();
     // Actually this is not required, since there's nothing to publish... but it's a test case!
     $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst, false);
     $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
     $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
     $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
     // Discarding the parent shall not discard the child records
     // Since the discarded parent does not need to be published, version children are not published as well
     $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Hotel #2'));
     $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)->setTable(self::TABLE_Hotel)->setField('title')->setValues('Testing #1'));
 }
Exemple #2
0
 /**
  * @test
  * @see DataSet/Assertion/modifyParentRecordWithHotelChildRecordAndDiscardModifiedParentRecord.csv
  */
 public function modifyParentWithHotelChildAndDiscardModifiedParent()
 {
     parent::modifyParentWithHotelChildAndDiscardModifiedParent();
     $this->actionService->publishWorkspace(self::VALUE_WorkspaceId);
     $this->assertAssertionDataSet('modifyParentNHotelChildNDiscardModifiedParent');
     $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
     $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #1'));
     // Discarding the parent shall not discard the child records
     $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1', 'Testing #1'));
     $this->assertThat($responseSections, $this->getRequestSectionStructureDoesNotHaveRecordConstraint()->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdFirst)->setRecordField(self::FIELD_ContentHotel)->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #2'));
 }