@@ 72-85 (lines=14) @@ | ||
69 | } |
|
70 | ||
71 | // this only applies to the test replicastore - in production we overlay data |
|
72 | function test_sync_start_resets_storage() { |
|
73 | $this->factory->post->create(); |
|
74 | $this->sender->do_sync(); |
|
75 | ||
76 | $this->assertEquals( 1, $this->server_replica_storage->post_count() ); |
|
77 | ||
78 | $this->sender->send_action( 'jetpack_full_sync_start' ); |
|
79 | $this->assertEquals( 0, $this->server_replica_storage->post_count() ); |
|
80 | ||
81 | $this->full_sync->start(); |
|
82 | $this->sender->do_full_sync(); |
|
83 | ||
84 | $this->assertEquals( 1, $this->server_replica_storage->post_count() ); |
|
85 | } |
|
86 | ||
87 | function test_sync_start_resets_previous_sync_and_sends_full_sync_cancelled() { |
|
88 | $this->factory->post->create(); |
@@ 93-108 (lines=16) @@ | ||
90 | } |
|
91 | ||
92 | // this only applies to the test replicastore - in production we overlay data |
|
93 | function test_sync_start_resets_storage() { |
|
94 | $this->factory->post->create(); |
|
95 | $this->sender->do_sync(); |
|
96 | ||
97 | $this->assertEquals( 1, $this->server_replica_storage->post_count() ); |
|
98 | ||
99 | do_action( 'jetpack_full_sync_start' ); |
|
100 | $this->sender->do_full_sync(); |
|
101 | ||
102 | $this->assertEquals( 0, $this->server_replica_storage->post_count() ); |
|
103 | ||
104 | $this->full_sync->start(); |
|
105 | $this->sender->do_full_sync(); |
|
106 | ||
107 | $this->assertEquals( 1, $this->server_replica_storage->post_count() ); |
|
108 | } |
|
109 | ||
110 | function test_sync_start_resets_previous_sync_and_sends_full_sync_cancelled() { |
|
111 | $this->factory->post->create(); |