You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to Codeception (and testing in general), so feel free to trash this if this is not really a bug or if PhpBrowser is actually a separate project.
I am trying to write my first test suite for an application that uses the Ion Auth authentication library which uses this type of redirect throughout. I assume they have a reason to do it, so I would be hesitant to change our code base just for PhpBrowser's sake.
Steps to reproduce
Create php file, index.php that uses a Reload redirect like so:
<?php header("Refresh:0;url=https://google.com");
Create a test to make sure the redirect works, like so:
<?php
$I = new WebGuy($scenario);
$I->wantTo('Redirect to Google.com');
$I->amOnPage('/index.php');
$I->seeCurrentUrlEquals('https://www.google.com/');
Configure your acceptance.suite.yml use use PhpBrowser (like so):
The test fails because PhpBrowser does not follow the redirect. Codeception's output:
Codeception PHP Testing Framework v1.7.1
Powered by PHPUnit 3.7.27 by Sebastian Bergmann.
Acceptance Tests (1) -----------------------------------------
Trying to redirect to google.com (RedirectCept.php) Fail
---------------------------------------------------------------
Time: 460 ms, Memory: 9.75Mb
There was 1 failure:
---------
1) Failed to redirect to google.com in RedirectCept.php
Sorry, I couldn't see current url equals "https://www.google.com/":
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'https://www.google.com/'
+'/~captbaritone/redirect/index.php'
Scenario Steps:
2. I see current url equals "https://www.google.com/"
1. I am on page "/index.php"
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
The text was updated successfully, but these errors were encountered:
I'm new to Codeception (and testing in general), so feel free to trash this if this is not really a bug or if PhpBrowser is actually a separate project.
I asked this question on StackExchange first and someone pointed out that Reload was not in the offical standards so perhaps PhpBrowser has no interest in supporting this functionality.
I am trying to write my first test suite for an application that uses the Ion Auth authentication library which uses this type of redirect throughout. I assume they have a reason to do it, so I would be hesitant to change our code base just for PhpBrowser's sake.
Steps to reproduce
Create php file,
index.php
that uses a Reload redirect like so:Create a test to make sure the redirect works, like so:
Configure your
acceptance.suite.yml
use use PhpBrowser (like so):Expected behavior
I would expect the test to pass
Actual behavior
The test fails because PhpBrowser does not follow the redirect. Codeception's output:
The text was updated successfully, but these errors were encountered: