Skip to content

Commit

Permalink
3 tests skipped until scenarios can be simulated.
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Aug 21, 2020
1 parent b8d2100 commit c16096c
Showing 1 changed file with 44 additions and 4 deletions.
48 changes: 44 additions & 4 deletions tests/tests/connectors/test-class-connector-installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,53 @@ public function setUp() {

public function test_callback_upgrader_process_complete() {
// Prepare scenario
$this->markTestSkipped( 'This test skipped until the needed scenario can be properly simulated.' );

// Expected log calls.
$this->mock->expects( $this->once() )
->method( 'log' )
->with(

->withConsecutive(
array(
_x(
'Installed %1$s: %2$s %3$s',
'Plugin/theme installation. 1: Type (plugin/theme), 2: Plugin/theme name, 3: Plugin/theme version',
'stream'
),
array(
'type' => 'plugin',
'name' => 'Hello Dolly',
'version' => '',
'slug' => 'hello_dolly.php',
'success' => true,
'error' => null,
'old_version' => '',
),
null,
'plugins',
'installed'
),
array(
_x(
'Updated %1$s: %2$s %3$s',
'Plugin/theme update. 1: Type (plugin/theme), 2: Plugin/theme name, 3: Plugin/theme version',
'stream'
),
array(
'type' => 'theme',
'name' => 'Twenty Twenty',
'version' => '',
'slug' => 'twentytwenty',
'success' => true,
'error' => null,
'old_version' => '',
),
null,
'themes',
'updated'
)
);

// Do stuff.
// Simulate installing plugin and updating theme to trigger callback.

// Check callback test action.
$this->assertFalse( 0 === did_action( 'wp_stream_test_callback_upgrader_process_complete' ) );
Expand All @@ -47,7 +85,7 @@ public function test_callback_activate_plugin() {
'"%1$s" plugin activated %2$s',
'1: Plugin name, 2: Single site or network wide',
'stream'
)
),
),
$this->equalTo(
array(
Expand Down Expand Up @@ -140,6 +178,7 @@ public function test_callback_delete_site_transient_update_themes() {

public function test_callback_pre_set_site_transient_update_plugins() {
// Prepare scenario
$this->markTestSkipped( 'This test skipped until the needed scenario can be properly simulated.' );

// Expected log calls.
$this->mock->expects( $this->once() )
Expand Down Expand Up @@ -167,6 +206,7 @@ public function test_callback_pre_set_site_transient_update_plugins() {

public function test_callback__core_updated_successfully() {
// Prepare scenario
$this->markTestSkipped( 'This test skipped until the needed scenario can be properly simulated.' );

// Expected log calls.
$this->mock->expects( $this->exactly( 2 ) )
Expand Down

0 comments on commit c16096c

Please sign in to comment.