/** * @test */ public function getLanguageOnSingleRecordThatWasADateRecord() { // This test comes from bug 1518 and covers the following situation: // We have an event record that has the topic field set as it was a // date record. But then it was switched to be a single event record. // In that case, the language from the single event record must be // returned, not the one from the referenced topic record. $topicRecordUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('language' => 'de')); $singleRecordUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('object_type' => tx_seminars_Model_Event::TYPE_COMPLETE, 'topic' => $topicRecordUid, 'language' => 'it')); $seminar = new tx_seminars_seminar($singleRecordUid); self::assertSame('Italiano', $seminar->getLanguageName()); }