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
It is very easy to extend a phd-based application with existing composer packages. You can integrate any Yii2
5
-
extension or PHP library into phd 4.
4
+
It is very easy to extend a phd-based application with existing composer packages. You can integrate any Yii2 extension or PHP library into phd.
6
5
7
-
docker-compose run --rm php bash
6
+
```
7
+
docker-compose run --rm php bash
8
+
```
8
9
9
10
Finding packages
10
11
----------------
11
12
12
13
Start with a search on [Packagist](https://packagist.org) or from your command line
13
14
14
-
$ composer search -N "yii2-excel"
15
+
```
16
+
$ composer search -N "yii2-excel"
17
+
```
15
18
16
19
Installing packages
17
20
-------------------
18
21
19
22
To install an extension simply require it in your `composer.json` with the following command
20
23
21
-
$ composer require vendor/package
24
+
```
25
+
$ composer require vendor/package
26
+
```
22
27
28
+
> Make sure to commit your `composer.lock` file, so your co-developers get the exact same version.
23
29
24
-
25
-
> Make sure to commit your `composer.lock` file, so your co-developers get the exact same version.
26
-
27
30
Configuring packages
28
31
--------------------
29
32
30
-
How to configure a package depends on the package and it's type. In general you can follow Yii's rules for application
31
-
module and component configuration.
32
-
33
-
33
+
How to configure a package depends on the package and it's type. In general you can follow Yii's rules for application module and component configuration.
Copy file name to clipboardExpand all lines: guide/development/testing.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ For acceptance or end-to-end tests for example you might want to use a "real" Se
17
17
18
18
Creating and running a test environment can be a cumbersome task, like executing your tests in an isolated database.
19
19
20
-
Therefore the phd 4 Docker images contain pre-installed Codeception binaries for running Yii 2.0 Framework unit-, functional- and acceptance-test-suites.
20
+
Therefore the phd Docker images contain pre-installed Codeception binaries for running Yii 2.0 Framework unit-, functional- and acceptance-test-suites.
21
21
22
22
### Configuration
23
23
@@ -53,6 +53,7 @@ Run codeception directly *(container bash)*
53
53
make bash
54
54
$ codecept run
55
55
56
+
> :bulb: Basically tests should be independent from each other. But depending on your setup `cli` tests can be used to initialize the test environment for the application.
56
57
57
58
### Advanced usage
58
59
@@ -82,15 +83,6 @@ $ codecept run functional --coverage --coverage-html
82
83
```
83
84
84
85
85
-
86
-
### FAQ
87
-
88
-
#### Functional vs. acceptance tests
89
-
90
-
Due to limitations functional-testing should only be used for basic tests, see codeception.com
91
-
92
-
For Login, JavaScript, Cookies, Session, ... use acceptance tests. See commands `wait(1)`, `waitForElement(1)`.
93
-
94
86
#### Grouping tests
95
87
96
88
tests/codeception
@@ -114,6 +106,18 @@ Further groups
114
106
-@group run-once
115
107
116
108
109
+
110
+
111
+
### FAQ
112
+
113
+
#### Functional vs. acceptance tests
114
+
115
+
Due to limitations functional-testing should only be used for basic tests, see codeception.com
116
+
117
+
For Login, JavaScript, Cookies, Session, ... use acceptance tests. See commands `wait(1)`, `waitForElement(1)`.
118
+
119
+
> Note: In Codeception acceptance tests checks are performed *as seen* in the browser, for example you have to check for `MYLINK` if there's a `text-transform: uppercase` or a link `mylink`.
120
+
117
121
#### Detecting application type
118
122
119
123
Console vs. Web config
@@ -123,7 +127,3 @@ Console vs. Web config
123
127
#### Re-run failed tests
124
128
125
129
codecept run -g failed
126
-
127
-
#### e2e (acceptance)
128
-
129
-
> Note: In Codeception acceptance tests checks are performed *as seen* in the browser, for example you have to check for `MYLINK` if there's a `text-transform: uppercase` or a link `mylink`.
Copy file name to clipboardExpand all lines: guide/development/troubleshooting.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Troubleshooting
2
2
===============
3
3
4
-
For more frequently asked questions (FAQ) see [GitHub](https://github.com/phundament/app/issues) and [Stackoverflow](http://stackoverflow.com/questions/tagged/phundament)
4
+
For more frequently asked questions (FAQ) see [GitHub](https://github.com/dmstr/docker-phd5-app/issues) and [Stackoverflow](http://stackoverflow.com/questions/tagged/phundament)
### Customizing startup and webserver configuration
9
9
10
-
You can build your custom container image on top of the [phd 4 Docker container](https://registry.hub.docker.com/u/phundament/app/) ([repository](https://github.com/phundament/docker)).
10
+
You can build your custom container image on top of the [phd Docker container](https://registry.hub.docker.com/u/phundament/app/) ([repository](https://github.com/phundament/docker)).
11
11
Just use the `FROM` instruction in your `Dockerfile`
Copy file name to clipboardExpand all lines: guide/tutorials/testing-yii2-extensions.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
**Note! This is a concept/prototype.**
4
4
5
-
You can use *[phd 4](https://github.com/phundament/app)* in a docker-stack "wrapped around" the extension directory.
5
+
You can use *[the vanilla application image](https://github.com/dmstr/docker-yii2-app)* in a docker-stack "wrapped around" the extension directory.
6
6
7
7
The basic concept is to start an application stack with `docker-compose` and "host-mount" the extension directly into `/vendor/name/extension`.
8
8
9
9
> You should be able to use this approach for any *Yii 2.0 Framework* extension. Note: You need to install the extension in the application. This is a current limitation.
10
10
11
-
In `tests/` resides a `docker-compose.yml` file, which contains an full-featured `phundament/app` stack, with pre-installed a *Codeception* test-framework on the `appcli`-container.
11
+
In `tests/` resides a `docker-compose.yml` file, which contains an full-featured `phd` stack, with pre-installed a *Codeception* test-framework on the `appcli`-container.
12
12
There are suites for CLI, unit, function and acceptance testing right - ready to use, right out of the box.
13
13
14
14
The stack also contains *Selenium* containers for acceptance testing with screenshots - *Firefox* or *Chrome*.
0 commit comments