Skip to content

Commit

Permalink
Merge pull request #28 from Codeception/upd
Browse files Browse the repository at this point in the history
update links
  • Loading branch information
Naktibalda authored Feb 19, 2022
2 parents b65eda3 + 70c9934 commit 8e1fdcc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/Codeception/Module/PhpBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
*
* * url *required* - start url of your app
* * headers - default headers are set before each test.
* * handler (default: curl) - Guzzle handler to use. By default curl is used, also possible to pass `stream`, or any valid class name as [Handler](http://docs.guzzlephp.org/en/latest/handlers-and-middleware.html#handlers).
* * handler (default: curl) - Guzzle handler to use. By default curl is used, also possible to pass `stream`, or any valid class name as [Handler](https://docs.guzzlephp.org/en/latest/handlers-and-middleware.html#handlers).
* * middleware - Guzzle middlewares to add. An array of valid callables is required.
* * curl - curl options
* * cookies - ...
* * auth - ...
* * verify - ...
* * .. those and other [Guzzle Request options](http://docs.guzzlephp.org/en/latest/request-options.html)
* * .. those and other [Guzzle Request options](https://docs.guzzlephp.org/en/latest/request-options.html)
*
*
* ### Example (`acceptance.suite.yml`)
Expand Down Expand Up @@ -74,7 +74,7 @@
*
* Properties:
*
* * `guzzle` - contains [Guzzle](http://guzzlephp.org/) client instance: `\GuzzleHttp\Client`
* * `guzzle` - contains [Guzzle](https://guzzlephp.org/) client instance: `\GuzzleHttp\Client`
* * `client` - Symfony BrowserKit instance.
*
*/
Expand Down Expand Up @@ -193,7 +193,7 @@ protected function onReconfigure()
/**
* Low-level API method.
* If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
* If Codeception commands are not enough, use [Guzzle HTTP Client](https://guzzlephp.org/) methods directly
*
* Example:
*
Expand Down
2 changes: 1 addition & 1 deletion tests/data/app/view/external_url.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<body>
<a href="http://codeception.com/">Next</a>
<a href="https://codeception.com/">Next</a>
</body>
</html>
4 changes: 2 additions & 2 deletions tests/unit/Codeception/Module/PhpBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,11 @@ public function testCookiesForDomain()
$handler = GuzzleHandlerStack::create($mock);
$handler->push(GuzzleMiddleware::history($this->history));

$client = new GuzzleClient(['handler' => $handler, 'base_uri' => 'http://codeception.com']);
$client = new GuzzleClient(['handler' => $handler, 'base_uri' => 'https://codeception.com']);
$guzzleConnector = new Guzzle();
$guzzleConnector->setClient($client);
$guzzleConnector->getCookieJar()->set(new Cookie('hello', 'world'));
$guzzleConnector->request('GET', 'http://codeception.com/');
$guzzleConnector->request('GET', 'https://codeception.com/');
$this->assertArrayHasKey('cookies', $this->history[0]['options']);
/** @var $cookie GuzzleHttp\Cookie\SetCookie **/
$cookies = $this->history[0]['options']['cookies']->toArray();
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/Codeception/Module/TestsForBrowsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ abstract class TestsForBrowsers extends TestsForWeb

public function testAmOnSubdomain()
{
$this->module->_reconfigure(['url' => 'http://google.com']);
$this->module->_reconfigure(['url' => 'https://google.com']);
$this->module->amOnSubdomain('user');
$this->assertEquals('http://user.google.com', $this->module->_getUrl());
$this->assertEquals('https://user.google.com', $this->module->_getUrl());

$this->module->_reconfigure(['url' => 'http://www.google.com']);
$this->module->_reconfigure(['url' => 'https://www.google.com']);
$this->module->amOnSubdomain('user');
$this->assertEquals('http://user.google.com', $this->module->_getUrl());
$this->assertEquals('https://user.google.com', $this->module->_getUrl());
}

public function testOpenAbsoluteUrls()
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/Codeception/Module/TestsForWeb.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public function testSeeLink()
{
$this->module->amOnPage('/external_url');
$this->module->seeLink('Next');
$this->module->seeLink('Next', 'http://codeception.com/');
$this->module->seeLink('Next', 'https://codeception.com/');
// Without TLD and trailing slash
$this->module->dontSeeLink('Next', 'http://codeception');
$this->module->dontSeeLink('Next', 'https://codeception');
}

public function testDontSeeLink()
Expand Down Expand Up @@ -150,9 +150,9 @@ public function testSeeLinkFailsIfHrefDoesNotMatch()
public function testSeeLinkFailsIfHrefDoesNotMatchExactly()
{
$this->expectException(AssertionFailedError::class);
$this->expectExceptionMessage("No links containing text 'Next' and URL 'http://codeception' were found in page /external_url");
$this->expectExceptionMessage("No links containing text 'Next' and URL 'https://codeception' were found in page /external_url");
$this->module->amOnPage('/external_url');
$this->module->seeLink('Next', 'http://codeception');
$this->module->seeLink('Next', 'https://codeception');
}

public function testDontSeeLinkFailsIfTextMatches()
Expand All @@ -166,9 +166,9 @@ public function testDontSeeLinkFailsIfTextMatches()
public function testDontSeeLinkFailsIfTextAndUrlMatches()
{
$this->expectException(AssertionFailedError::class);
$this->expectExceptionMessage("Link containing text 'Next' and URL 'http://codeception.com/' was found in page /external_url");
$this->expectExceptionMessage("Link containing text 'Next' and URL 'https://codeception.com/' was found in page /external_url");
$this->module->amOnPage('/external_url');
$this->module->dontSeeLink('Next', 'http://codeception.com/');
$this->module->dontSeeLink('Next', 'https://codeception.com/');
}

public function testSeeLinkMatchesRelativeLink()
Expand Down

0 comments on commit 8e1fdcc

Please sign in to comment.