Skip to content

Commit f5d35ce

Browse files
committed
Missing pieces
1 parent da5bc78 commit f5d35ce

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/Synthesizers/EntrySynthesizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public function hydrate($value): EntryContract
6363
$entry->date($date);
6464
}
6565

66+
$entry->syncOriginal();
67+
6668
return $entry;
6769
}
6870
}

tests/Synthesizers/EntryCollectionSynthesizerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function entry_collection_gets_dehydrated_and_rehydrated_correctly()
7373

7474
$this->assertInstanceOf(EntryCollection::class, $testable->entries);
7575
$this->assertInstanceOf(\Statamic\Contracts\Entries\Entry::class, $testable->entries->first());
76-
$this->assertSame(Entry::all()->first()->id(), $testable->entries->first()->id());
76+
$this->assertEquals(Entry::all(), $testable->entries);
7777
}
7878

7979
protected function setUp(): void
@@ -83,8 +83,10 @@ protected function setUp(): void
8383
Collection::make('entries')->save();
8484

8585
Entry::make()
86-
->collection('entries')
8786
->id('1')
87+
->collection('entries')
88+
->blueprint('entry')
89+
->locale('default')
8890
->data(['title' => 'Entry 1'])
8991
->save();
9092
}

tests/Synthesizers/EntrySynthesizerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function entry_gets_dehydrated_and_rehydrated_correctly()
7777
$expected = Entry::find('1');
7878

7979
$this->assertInstanceOf(\Statamic\Contracts\Entries\Entry::class, $testable->entry);
80+
$this->assertEquals($expected, $testable->entry);
8081
$this->assertSame($expected->id(), $testable->entry->id());
8182
$this->assertSame($expected->collection(), $testable->entry->collection());
8283
$this->assertSame($expected->origin(), $testable->entry->origin());

tests/Synthesizers/ValueSynthesizerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ protected function setUp(): void
7373
Collection::make('entries')->save();
7474

7575
Entry::make()
76-
->collection('entries')
7776
->id('1')
77+
->collection('entries')
78+
->blueprint('entry')
79+
->locale('default')
7880
->data(['title' => 'Entry 1'])
7981
->save();
8082
}

0 commit comments

Comments
 (0)