Example #1
0
 /**
  * @test
  * @see DataSet/Assertion/createAndCopyParentContentRecordWithHotelAndOfferChildRecords.csv
  */
 public function createAndCopyParentContentWithHotelAndOfferChildren()
 {
     parent::createAndCopyParentContentWithHotelAndOfferChildren();
     $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']);
     $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']);
     $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren');
     $responseSections = $this->getFrontendResponse(self::VALUE_PageId, 0)->getResponseSections();
     $this->assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()->setTable(self::TABLE_Content)->setField('header')->setValues('Testing #1 (copy 1)'));
     $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['newContentId'])->setRecordField(self::FIELD_ContentHotel)->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
     $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['copiedContentId'])->setRecordField(self::FIELD_ContentHotel)->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1'));
     $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint()->setRecordIdentifier(self::TABLE_Hotel . ':' . $this->recordIds['copiedHotelId'])->setRecordField(self::FIELD_HotelOffer)->setTable(self::TABLE_Offer)->setField('title')->setValues('Offer #1'));
 }