Skip to content

Commit

Permalink
upgrade codeception tests
Browse files Browse the repository at this point in the history
  • Loading branch information
delboy1978uk committed Aug 14, 2024
1 parent efaa049 commit 62fe2b3
Show file tree
Hide file tree
Showing 24 changed files with 309 additions and 537 deletions.
4 changes: 2 additions & 2 deletions tests/acceptance.suite.yml → tests/Acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser
- AcceptanceHelper
- Tests\Support\Helper\AcceptanceHelper
config:
PhpBrowser:
url: 'http://192.168.99.100'
url: 'http://awesome.scot'
env:
travis:
modules:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Tests\Support\AcceptanceTester;

$I = new AcceptanceTester($scenario);
$I->wantTo("ensure th' ship is docked in the Bay of Hoempaige");
$I->setHeader('X-Anything', 'anything');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php
<?php

use Tests\Support\AcceptanceTester;

$I = new AcceptanceTester($scenario);
$I->wantTo("ensure we get 404 messages!");
$I->amOnPage('/en_PI/shiver/me/timbers');
$I->see('LOST AT SEA');
$I->amOnPage('nl_BE/behold/the/kraken');
$I->see('LOST AT SEA');
$I->amOnPage('fr_BE/davie/jones');
$I->see('LOST AT SEA');
$I->see('LOST AT SEA');
File renamed without changes.
4 changes: 3 additions & 1 deletion tests/functional.suite.yml → tests/Functional.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

class_name: FunctionalTester
modules:
enabled: [Filesystem, FunctionalHelper]
enabled:
- Filesystem
- Tests\Support\Helper\FunctionalHelper
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php


namespace Tests\Support;

/**
* Inherited Methods
* @method void wantToTest($text)
Expand All @@ -15,12 +17,12 @@
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
*
* @SuppressWarnings(PHPMD)
*/
*/
class AcceptanceTester extends \Codeception\Actor
{
use _generated\AcceptanceTesterActions;
use \Tests\Support\_generated\AcceptanceTesterActions;

/**
* Define custom actions here
*/
/**
* Define custom actions here
*/
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php


namespace Tests\Support;

/**
* Inherited Methods
* @method void wantToTest($text)
Expand All @@ -15,12 +17,12 @@
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
*
* @SuppressWarnings(PHPMD)
*/
*/
class FunctionalTester extends \Codeception\Actor
{
use _generated\FunctionalTesterActions;
use \Tests\Support\_generated\FunctionalTesterActions;

/**
* Define custom actions here
*/
/**
* Define custom actions here
*/
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
namespace Codeception\Module;

declare(strict_types=1);

namespace Tests\Support\Helper;

// here you can define custom actions
// all public methods declared in helper class will be available in $I
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
namespace Codeception\Module;

declare(strict_types=1);

namespace Tests\Support\Helper;

// here you can define custom actions
// all public methods declared in helper class will be available in $I
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
namespace Codeception\Module;

declare(strict_types=1);

namespace Tests\Support\Helper;

// here you can define custom actions
// all public methods declared in helper class will be available in $I
Expand Down
12 changes: 7 additions & 5 deletions tests/_support/UnitTester.php → tests/Support/UnitTester.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php


namespace Tests\Support;

/**
* Inherited Methods
* @method void wantToTest($text)
Expand All @@ -15,12 +17,12 @@
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
*
* @SuppressWarnings(PHPMD)
*/
*/
class UnitTester extends \Codeception\Actor
{
use _generated\UnitTesterActions;
use \Tests\Support\_generated\UnitTesterActions;

/**
* Define custom actions here
*/
/**
* Define custom actions here
*/
}
Loading

0 comments on commit 62fe2b3

Please sign in to comment.