Last active
October 31, 2017 19:36
-
-
Save JohnDeeBDD/4ce8330e70ad918bb5ab446c388bd27b to your computer and use it in GitHub Desktop.
This is part of a tutorial on WordPress related Behavior Driven Development (BDD). The full tutorial can be found at: https://wordpress-bdd.com/your-first-test/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ShortcodeHelloWorldTest extends \Codeception\TestCase\WPTestCase{ | |
/** | |
* @test | |
* it should render the shortcode | |
*/ | |
public function it_should_render_the_shortcode(){ | |
// GIVEN / ARRANGE | |
$shortCode = "[first-testable-shortcode]"; | |
// WHEN / ACT | |
$returnedContent = do_shortcode($shortCode); | |
// THEN / ASSERT | |
$this->assertContains("Hello World!", $returnedContent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment