Skip to content

Commit

Permalink
Merge pull request #2838 from timber/2.x-fix-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gchtr committed Nov 9, 2023
2 parents 451e640 + 6fbf274 commit ee467c6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpstan.neon
Expand Up @@ -8,6 +8,7 @@ parameters:
- vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php
excludePaths:
- tests/*
- docs/*
ignoreErrors:
- '#Instantiated class Twig\\CacheExtension\\CacheStrategy\\GenerationalCacheStrategy not found.#'
- '#Instantiated class Twig\\CacheExtension\\Extension not found.#'
Expand Down
18 changes: 18 additions & 0 deletions tests/test-timber-wp-functions.php
Expand Up @@ -12,6 +12,9 @@ public function testFunctionFire()
$this->assertEquals('jared sez hi', $output);
}

/**
* @expectedDeprecated the_block_template_skip_link
*/
public function testFooterOnFooterFW()
{
global $wp_scripts;
Expand All @@ -27,6 +30,9 @@ public function testFooterOnFooterFW()
$this->assertSame(0, strlen($wp_footer_output1));
}

/**
* @expectedDeprecated the_block_template_skip_link
*/
public function testFooterAlone()
{
global $wp_scripts;
Expand All @@ -47,6 +53,9 @@ public function testDoubleAction()
$this->assertEquals('bar', $fw1->call());
}

/**
* @expectedDeprecated the_block_template_skip_link
*/
public function testDoubleActionWPFooter()
{
global $wp_scripts;
Expand All @@ -60,6 +69,9 @@ public function testDoubleActionWPFooter()
remove_action('wp_footer', 'echo_junk');
}

/**
* @expectedDeprecated the_block_template_skip_link
*/
public function testInTwig()
{
global $wp_scripts;
Expand All @@ -70,6 +82,9 @@ public function testInTwig()
$this->assertGreaterThan(-1, $pos);
}

/**
* @expectedDeprecated the_block_template_skip_link
*/
public function testInTwigString()
{
global $wp_scripts;
Expand All @@ -80,6 +95,9 @@ public function testInTwigString()
$this->assertGreaterThan(-1, $pos);
}

/**
* @expectedDeprecated the_block_template_skip_link
*/
public function testAgainstFooterFunctionOutput()
{
global $wp_scripts;
Expand Down

0 comments on commit ee467c6

Please sign in to comment.