@@ 422-440 (lines=19) @@ | ||
419 | $this->synced_user_ids = $user_ids; |
|
420 | } |
|
421 | ||
422 | function test_full_sync_sends_all_constants() { |
|
423 | define( 'TEST_SYNC_ALL_CONSTANTS', 'foo' ); |
|
424 | ||
425 | $helper = new Jetpack_Sync_Test_Helper(); |
|
426 | $helper->array_override = array( 'TEST_SYNC_ALL_CONSTANTS' ); |
|
427 | add_filter( 'jetpack_sync_constants_whitelist', array( $helper, 'filter_override_array' ) ); |
|
428 | ||
429 | $this->sender->do_sync(); |
|
430 | ||
431 | // reset the storage, check value, and do full sync - storage should be set! |
|
432 | $this->server_replica_storage->reset(); |
|
433 | ||
434 | $this->assertEquals( null, $this->server_replica_storage->get_constant( 'TEST_SYNC_ALL_CONSTANTS' ) ); |
|
435 | ||
436 | $this->full_sync->start(); |
|
437 | $this->sender->do_full_sync(); |
|
438 | ||
439 | $this->assertEquals( 'foo', $this->server_replica_storage->get_constant( 'TEST_SYNC_ALL_CONSTANTS' ) ); |
|
440 | } |
|
441 | ||
442 | function test_full_sync_constants_updates_checksums() { |
|
443 | define( 'FOO_SYNC_ALL_CONSTANTS', 'foo' ); |
@@ 600-618 (lines=19) @@ | ||
597 | $this->synced_user_ids = $user_ids; |
|
598 | } |
|
599 | ||
600 | function test_full_sync_sends_all_constants() { |
|
601 | define( 'TEST_SYNC_ALL_CONSTANTS', 'foo' ); |
|
602 | ||
603 | $helper = new Jetpack_Sync_Test_Helper(); |
|
604 | $helper->array_override = array( 'TEST_SYNC_ALL_CONSTANTS' ); |
|
605 | add_filter( 'jetpack_sync_constants_whitelist', array( $helper, 'filter_override_array' ) ); |
|
606 | ||
607 | $this->sender->do_sync(); |
|
608 | ||
609 | // reset the storage, check value, and do full sync - storage should be set! |
|
610 | $this->server_replica_storage->reset(); |
|
611 | ||
612 | $this->assertEquals( null, $this->server_replica_storage->get_constant( 'TEST_SYNC_ALL_CONSTANTS' ) ); |
|
613 | ||
614 | $this->full_sync->start(); |
|
615 | $this->sender->do_full_sync(); |
|
616 | ||
617 | $this->assertEquals( 'foo', $this->server_replica_storage->get_constant( 'TEST_SYNC_ALL_CONSTANTS' ) ); |
|
618 | } |
|
619 | ||
620 | function test_full_sync_constants_updates_checksums() { |
|
621 | define( 'FOO_SYNC_ALL_CONSTANTS', 'foo' ); |