Skip to content

Commit

Permalink
Calypsoify: Add test to fail under 9.2 (#17942)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj authored and jeherve committed Dec 3, 2020
1 parent be06727 commit c236015
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<testsuite name="comment-likes">
<directory prefix="test" suffix=".php">tests/php/modules/comment-likes</directory>
</testsuite>
<testsuite name="calypsoify">
<directory prefix="test" suffix=".php">tests/php/modules/calypsoify</directory>
</testsuite>
<testsuite name="likes">
<directory prefix="test_" suffix=".php">tests/php/modules/likes</directory>
</testsuite>
Expand Down
37 changes: 37 additions & 0 deletions tests/php/modules/calypsoify/test-class.jetpack-calypsoify.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* Class Calypsoify.
*
* @package Jetpack
*/

require_jetpack_file( 'modules/calypsoify/class.jetpack-calypsoify.php' );

/**
* Class WP_Test_Jetpack_Calypsoify
*/
class WP_Test_Jetpack_Calypsoify extends WP_UnitTestCase {

/**
* Sets up each test.
*
* @inheritDoc
*/
public function setUp() {
parent::setUp();
$this->instance = Jetpack_Calypsoify::getInstance();
}

/**
* Sets up the Masterbar mock.
*
* For sites when Masterbar is not active, we mock it. This test confirms that functions.
*
* @covers Jetpack_Calypsoify::mock_masterbar_activation
* @see https://github.com/Automattic/jetpack/pull/17939
*/
public function test_mock_masterbar_activation() {
$this->instance->mock_masterbar_activation();
$this->assertTrue( class_exists( '\Automattic\Jetpack\Dashboard_Customizations\Masterbar' ) );
}
}

0 comments on commit c236015

Please sign in to comment.