Skip to content

Commit 5b4ae61

Browse files
committed
Initial stub of test suite
1 parent a95f4cf commit 5b4ae61

17 files changed

+293
-0
lines changed

.env.testing

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
TEST_SITE_DB_DSN=mysql:host=localhost;dbname=test
2+
TEST_SITE_DB_HOST=localhost
3+
TEST_SITE_DB_NAME=test
4+
TEST_SITE_DB_USER=root
5+
TEST_SITE_DB_PASSWORD=password
6+
TEST_SITE_TABLE_PREFIX=wp_
7+
TEST_SITE_ADMIN_USERNAME=admin
8+
TEST_SITE_ADMIN_PASSWORD=password
9+
TEST_SITE_WP_ADMIN_PATH=/wp-admin
10+
WP_ROOT_FOLDER=/var/www/html
11+
TEST_DB_NAME=test
12+
TEST_DB_HOST=localhost
13+
TEST_DB_USER=root
14+
TEST_DB_PASSWORD=password
15+
TEST_TABLE_PREFIX=wp_
16+
TEST_SITE_WP_URL=http://wordpress.test
17+
TEST_SITE_WP_DOMAIN=wordpress.test
18+
TEST_SITE_ADMIN_EMAIL=[email protected]

codeception.dist.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
paths:
2+
tests: tests
3+
output: tests/_output
4+
data: tests/_data
5+
support: tests/_support
6+
envs: tests/_envs
7+
actor_suffix: Tester
8+
extensions:
9+
enabled:
10+
- Codeception\Extension\RunFailed
11+
commands:
12+
- Codeception\Command\GenerateWPUnit
13+
- Codeception\Command\GenerateWPRestApi
14+
- Codeception\Command\GenerateWPRestController
15+
- Codeception\Command\GenerateWPRestPostTypeController
16+
- Codeception\Command\GenerateWPAjax
17+
- Codeception\Command\GenerateWPCanonical
18+
- Codeception\Command\GenerateWPXMLRPC
19+
params:
20+
- .env.testing

tests/_data/.gitkeep

Whitespace-only changes.

tests/_output/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
4+
/**
5+
* Inherited Methods
6+
* @method void wantToTest($text)
7+
* @method void wantTo($text)
8+
* @method void execute($callable)
9+
* @method void expectTo($prediction)
10+
* @method void expect($prediction)
11+
* @method void amGoingTo($argumentation)
12+
* @method void am($role)
13+
* @method void lookForwardTo($achieveValue)
14+
* @method void comment($description)
15+
* @method void pause()
16+
*
17+
* @SuppressWarnings(PHPMD)
18+
*/
19+
class AcceptanceTester extends \Codeception\Actor
20+
{
21+
use _generated\AcceptanceTesterActions;
22+
23+
/**
24+
* Define custom actions here
25+
*/
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
4+
/**
5+
* Inherited Methods
6+
* @method void wantToTest($text)
7+
* @method void wantTo($text)
8+
* @method void execute($callable)
9+
* @method void expectTo($prediction)
10+
* @method void expect($prediction)
11+
* @method void amGoingTo($argumentation)
12+
* @method void am($role)
13+
* @method void lookForwardTo($achieveValue)
14+
* @method void comment($description)
15+
* @method void pause()
16+
*
17+
* @SuppressWarnings(PHPMD)
18+
*/
19+
class FunctionalTester extends \Codeception\Actor
20+
{
21+
use _generated\FunctionalTesterActions;
22+
23+
/**
24+
* Define custom actions here
25+
*/
26+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Helper;
3+
4+
// here you can define custom actions
5+
// all public methods declared in helper class will be available in $I
6+
7+
class Acceptance extends \Codeception\Module
8+
{
9+
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Helper;
3+
4+
// here you can define custom actions
5+
// all public methods declared in helper class will be available in $I
6+
7+
class Functional extends \Codeception\Module
8+
{
9+
10+
}

tests/_support/Helper/Unit.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Helper;
3+
4+
// here you can define custom actions
5+
// all public methods declared in helper class will be available in $I
6+
7+
class Unit extends \Codeception\Module
8+
{
9+
10+
}

tests/_support/Helper/Wpunit.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Helper;
3+
4+
// here you can define custom actions
5+
// all public methods declared in helper class will be available in $I
6+
7+
class Wpunit extends \Codeception\Module
8+
{
9+
10+
}

0 commit comments

Comments
 (0)