Created
July 11, 2024 11:38
-
-
Save hugopeixoto/2712be8b48dc36ade2123700c5c7a58a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
require_once("tests/TestHelper.php"); | |
use Symfony\Component\DomCrawler\Crawler; | |
test('pages/home/index', function () { | |
global $_SESSION; | |
$_SESSION = []; | |
ob_start(); | |
require("src/pages/home/index.php"); | |
$contents = ob_get_contents(); | |
ob_end_clean(); | |
$crawler = new Crawler($contents); | |
expect($crawler->filter('main > .index-dashboard .scoreboard-widget')->count())->toBe(15); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment