Skip to content

Commit 0069ff9

Browse files
committed
Composer init with Codeception.
1 parent ed9ee1c commit 0069ff9

File tree

10 files changed

+75
-2
lines changed

10 files changed

+75
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
composer.lock
22
vendor
3+
4+
tests/_output/*

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
],
1212
"autoload": {
1313
"psr-4": {
14-
"Selector\\": "src"
14+
"Codeception\\Module\\": "src"
1515
}
1616
},
1717
"require-dev": {
18-
"phpspec/phpspec": "~2.1"
18+
"codeception/codeception": "2.*"
1919
}
2020
}

tests/_bootstrap.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
// This is global bootstrap for autoloading

tests/_data/dump.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Replace this file with actual dump of your database */

tests/_output/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

tests/_support/FunctionalTester.php

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 \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
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+
}

tests/_support/Helper/Functional.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Helper;
3+
// here you can define custom actions
4+
// all public methods declared in helper class will be available in $I
5+
6+
class Functional extends \Codeception\Module
7+
{
8+
9+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php //[STAMP] c191ac0986f2902bab006307f7c9875b
2+
namespace _generated;
3+
4+
// This class was automatically generated by build task
5+
// You should not change it manually as it will be overwritten on next build
6+
// @codingStandardsIgnoreFile
7+
8+
use Helper\Functional;
9+
10+
trait FunctionalTesterActions
11+
{
12+
/**
13+
* @return \Codeception\Scenario
14+
*/
15+
abstract protected function getScenario();
16+
17+
18+
}

tests/functional.suite.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Codeception Test Suite Configuration
2+
#
3+
# Suite for functional (integration) tests
4+
# Emulate web requests and make application process them
5+
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it
6+
7+
class_name: FunctionalTester
8+
modules:
9+
enabled:
10+
# add framework module here
11+
- \Helper\Functional

tests/functional/_bootstrap.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
// Here you can initialize variables that will be available to your tests

0 commit comments

Comments
 (0)