Skip to content

Commit 77ad83f

Browse files
committed
refreshed docs, added parallel reporting
1 parent 36d9b1c commit 77ad83f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+361
-637
lines changed

RoboFile.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,29 @@ public function buildDocsGuides() {
140140

141141
foreach ($guides as $file) {
142142
$name = substr($file->getBasename(), 0, -3);
143-
$title = preg_replace("(\d+-)", '', $name);
144-
$this->_copy($file->getPathname(), 'docs' . DIRECTORY_SEPARATOR . $file->getBasename());
145-
$this->_copy($file->getPathname(), 'docs' . DIRECTORY_SEPARATOR . $title . '.md');
143+
$titleName = preg_replace("(\d+-)", '', $name);
146144

147-
$link = "/docs/$title";
148-
$title = preg_replace('/([A-Z]+)([A-Z][a-z])/', '\\1 \\2', $title);
145+
$link = "/docs/$titleName";
146+
$editLink = 'https://github.com/Codeception/codeception.github.com/edit/master/guides/' . $file->getBasename();
147+
$title = preg_replace('/([A-Z]+)([A-Z][a-z])/', '\\1 \\2', $titleName);
149148
$title = preg_replace('/([a-z\d])([A-Z])/', '\\1 \\2', $title);
150149

150+
$contents = file_get_contents($file->getPathname());
151+
152+
foreach ([$file->getBasename(), $titleName . '.md'] as $filename) {
153+
$this->taskWriteToFile('docs/' . $filename)
154+
->line('---')
155+
->line('layout: doc')
156+
->line("title: $title - Codeception Docs")
157+
->line('---')
158+
->line('')
159+
->line('')
160+
->text($contents)
161+
->line('')
162+
->line('<div class="alert alert-warning"><a href="'.$editLink.'"><strong>Improve</strong> this guide</a></div>')
163+
->run();
164+
}
165+
151166
$guidesLinks[] = "<li><a href=\"$link\">$title</a></li>";
152167
}
153168
file_put_contents('_includes/guides.html', implode("\n", $guidesLinks));

_includes/guides.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<li><a href="/docs/AcceptanceTests">Acceptance Tests</a></li>
44
<li><a href="/docs/FunctionalTests">Functional Tests</a></li>
55
<li><a href="/docs/UnitTests">Unit Tests</a></li>
6+
<li><a href="/docs/Debugging">Debugging</a></li>
67
<li><a href="/docs/ModulesAndHelpers">Modules And Helpers</a></li>
78
<li><a href="/docs/ReusingTestCode">Reusing Test Code</a></li>
89
<li><a href="/docs/AdvancedUsage">Advanced Usage</a></li>
@@ -12,5 +13,4 @@
1213
<li><a href="/docs/APITesting">API Testing</a></li>
1314
<li><a href="/docs/Codecoverage">Codecoverage</a></li>
1415
<li><a href="/docs/ContinuousIntegration">Continuous Integration</a></li>
15-
<li><a href="/docs/ParallelExecution">Parallel Execution</a></li>
16-
<li><a href="/docs/Debugging">Debugging</a></li>
16+
<li><a href="/docs/ParallelExecution">Parallel Execution</a></li>

docs/01-Introduction.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Introduction - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 01-Introduction - Codeception - Documentation
@@ -129,9 +135,4 @@ It allows writing unit, functional, integration, and acceptance tests in a singl
129135
All Codeception tests are written in a descriptive manner.
130136
Just by looking at the test body, you can clearly understand what is being tested and how it is performed.
131137

132-
133-
134-
135-
* **Next Chapter: [GettingStarted >](/docs/02-GettingStarted)**
136-
137-
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/01-Introduction.md"><strong>Edit</strong> this page on GitHub</a></div>
138+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/01-Introduction.md"><strong>Improve</strong> this guide</a></div>

docs/02-GettingStarted.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Getting Started - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 02-GettingStarted - Codeception - Documentation
@@ -439,10 +445,4 @@ There are plenty of useful Codeception commands:
439445
We have taken a look into the Codeception structure. Most of the things you need were already generated by the `bootstrap` command.
440446
After you have reviewed the basic concepts and configurations, you can start writing your first scenario.
441447

442-
443-
444-
445-
* **Next Chapter: [AcceptanceTests >](/docs/03-AcceptanceTests)**
446-
* **Previous Chapter: [< Introduction](/docs/01-Introduction)**
447-
448-
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/02-GettingStarted.md"><strong>Edit</strong> this page on GitHub</a></div>
448+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/02-GettingStarted.md"><strong>Improve</strong> this guide</a></div>

docs/03-AcceptanceTests.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Acceptance Tests - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 03-AcceptanceTests - Codeception - Documentation
@@ -916,10 +922,4 @@ You can easily test your Joomla, Drupal, WordPress sites, as well as those made
916922
Writing acceptance tests is like describing a tester's actions in PHP. They are quite readable and very easy to write.
917923
If you need to access the database, you can use the [Db Module](https://codeception.com/docs/modules/Db).
918924

919-
920-
921-
922-
* **Next Chapter: [FunctionalTests >](/docs/04-FunctionalTests)**
923-
* **Previous Chapter: [< GettingStarted](/docs/02-GettingStarted)**
924-
925-
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/03-AcceptanceTests.md"><strong>Edit</strong> this page on GitHub</a></div>
925+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/03-AcceptanceTests.md"><strong>Improve</strong> this guide</a></div>

docs/04-FunctionalTests.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Functional Tests - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 04-FunctionalTests - Codeception - Documentation
@@ -273,10 +279,4 @@ and manipulate their internal state. This makes your tests shorter and faster. I
273279
if you don't use frameworks there is no practical reason to write functional tests.
274280
If you are using a framework other than the ones listed here, create a module for it and share it with the community.
275281

276-
277-
278-
279-
* **Next Chapter: [UnitTests >](/docs/05-UnitTests)**
280-
* **Previous Chapter: [< AcceptanceTests](/docs/03-AcceptanceTests)**
281-
282-
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/04-FunctionalTests.md"><strong>Edit</strong> this page on GitHub</a></div>
282+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/04-FunctionalTests.md"><strong>Improve</strong> this guide</a></div>

docs/05-UnitTests.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Unit Tests - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 05-UnitTests - Codeception - Documentation
@@ -537,10 +543,4 @@ you don't need to install PHPUnit separately, but use Codeception directly to ex
537543
Some nice features can be added to common unit tests by integrating Codeception modules.
538544
For most unit and integration testing, PHPUnit tests are enough. They run fast, and are easy to maintain.
539545

540-
541-
542-
543-
* **Next Chapter: [ModulesAndHelpers >](/docs/06-ModulesAndHelpers)**
544-
* **Previous Chapter: [< FunctionalTests](/docs/04-FunctionalTests)**
545-
546-
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/05-UnitTests.md"><strong>Edit</strong> this page on GitHub</a></div>
546+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/05-UnitTests.md"><strong>Improve</strong> this guide</a></div>

docs/13-Debugging.md renamed to docs/06-Debugging.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Debugging - Codeception Docs
4+
---
5+
6+
17
# Debugging
28

39
Writing a test is always the process of learning the code and the application.
@@ -63,3 +69,5 @@ $I->pause(['user' => $user])
6369
codecept_pause(['user' => $user]);
6470
{% endhighlight %}
6571

72+
73+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/06-Debugging.md"><strong>Improve</strong> this guide</a></div>

docs/06-ModulesAndHelpers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Modules And Helpers - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 06-ModulesAndHelpers - Codeception - Documentation
@@ -612,10 +618,4 @@ you are free to write your own! Use Helpers (custom modules) for everything that
612618
Helpers also can be used to extend the functionality of the original modules.
613619

614620

615-
616-
617-
* **Next Chapter: [ReusingTestCode >](/docs/06-ReusingTestCode)**
618-
* **Previous Chapter: [< UnitTests](/docs/05-UnitTests)**
619-
620-
621-
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/docs/06-ModulesAndHelpers.md"><strong>Edit</strong> this page on GitHub</a></div>
621+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/06-ModulesAndHelpers.md"><strong>Improve</strong> this guide</a></div>

docs/06-ReusingTestCode.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: doc
3+
title: Reusing Test Code - Codeception Docs
4+
---
5+
6+
17
---
28
layout: doc
39
title: 06-ReusingTestCode - Codeception - Documentation
@@ -292,7 +298,4 @@ Scenario-driven tests should not contain anything more complex than `$I->doSomet
292298
Following this approach will allow you to keep your tests clean, readable, stable and make them easy to maintain.
293299

294300

295-
296-
297-
* **Next Chapter: [AdvancedUsage >](/docs/07-AdvancedUsage)**
298-
* **Previous Chapter: [< ModulesAndHelpers](/docs/06-ModulesAndHelpers)**
301+
<div class="alert alert-warning"><a href="https://github.com/Codeception/codeception.github.com/edit/master/guides/06-ReusingTestCode.md"><strong>Improve</strong> this guide</a></div>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy