File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -682,6 +682,30 @@ public function testDeferredSetManyPersistsAfterPersist(): void
682682 $ this ->assertSame ('deferred@example.com ' , $ data ['siteEmail ' ]['value ' ]);
683683 }
684684
685+ public function testDeferredSetReturnsPendingValueBeforePersist (): void
686+ {
687+ $ this ->settings ->set ('Example.siteName ' , 'FileStoredSingle ' );
688+
689+ $ deferredSettings = $ this ->createDeferredSettings ();
690+
691+ $ deferredSettings ->set ('Example.siteName ' , 'FilePendingSingle ' );
692+
693+ $ this ->assertSame ('FilePendingSingle ' , $ deferredSettings ->get ('Example.siteName ' ));
694+ }
695+
696+ public function testDeferredSetManyReturnsPendingValueBeforePersist (): void
697+ {
698+ $ this ->settings ->set ('Example.siteName ' , 'FileStoredBatch ' );
699+
700+ $ deferredSettings = $ this ->createDeferredSettings ();
701+
702+ $ deferredSettings ->setMany ([
703+ 'Example.siteName ' => 'FilePendingBatch ' ,
704+ ]);
705+
706+ $ this ->assertSame ('FilePendingBatch ' , $ deferredSettings ->get ('Example.siteName ' ));
707+ }
708+
685709 public function testDeferredSetManyPersistsDifferentClassesAfterPersist (): void
686710 {
687711 $ deferredSettings = $ this ->createDeferredSettings ();
You can’t perform that action at this time.
0 commit comments