diff --git a/tests/laravel-functional/BladeComponentCest.php b/tests/laravel-functional/BladeComponentCest.php index 2760033..0227138 100644 --- a/tests/laravel-functional/BladeComponentCest.php +++ b/tests/laravel-functional/BladeComponentCest.php @@ -69,22 +69,12 @@ public function testAssertContentIsRequiredOnEndpoint(FunctionalTester $I) public function testQrCodeComponentSimpleText(FunctionalTester $I) { $I->wantTo('Blade Component: Assert simple text QR Code creation'); - $I->amOnRoute('app.blade'); + $I->amOnPage('/'); $source = $I->grabPageSource(); - - $qrCode = file_get_contents(codecept_data_dir('blade/qrcode-blade.png')); - - $I->assertEquals(base64_encode($qrCode), $this->grabBase64($source)); - } - - protected function grabBase64(string $source) - { var_dump($source); - die; - $data = explode('base64,', $source)[1]; - $data = explode('=="', $data)[0]; + $qrCode = file_get_contents(codecept_data_dir('blade/qrcode-blade.png')); - return $data . '=='; + $I->seeInSource(base64_encode($qrCode)); } public function testQrCodeComponentWithImage(FunctionalTester $I) @@ -116,4 +106,4 @@ public function testQrCodeComponentWithColors(FunctionalTester $I) $I->seeInSource(base64_encode($qrCodeBackground)); $I->seeInSource(base64_encode($qrCodeForeground)); } -} +} \ No newline at end of file