Skip to content

Commit a5f68c3

Browse files
Remove Cept format from documentation pages (Codeception#475)
1 parent 6c23495 commit a5f68c3

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

docs/07-AdvancedUsage.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ For example, you might need some tests to be executed in Firefox only, and some
467467
The desired environments can be specified with the `@env` annotation for tests in Test and Cest formats:
468468

469469
{% highlight php %}
470-
471470
<?php
472471
class UserCest
473472
{
@@ -482,17 +481,6 @@ class UserCest
482481
// I do something
483482
}
484483
}
485-
486-
{% endhighlight %}
487-
488-
For Cept you should use simple comments:
489-
490-
{% highlight php %}
491-
492-
<?php
493-
// @env firefox
494-
// @env chrome
495-
496484
{% endhighlight %}
497485
498486
This way you can easily control which tests will be executed for each environment.
@@ -524,20 +512,16 @@ $scenario->current('capabilities');
524512

525513
{% endhighlight %}
526514

527-
You can access `\Codeception\Scenario` in the Cept and Cest formats.
528-
In Cept, the `$scenario` variable is available by default,
529-
while in Cest you should retrieve it through dependency injection:
515+
You can inject `\Codeception\Scenario` like this:
530516

531517
{% highlight php %}
532-
533518
<?php
534519
public function myTest(\AcceptanceTester $I, \Codeception\Scenario $scenario)
535520
{
536521
if ($scenario->current('browser') == 'chrome') {
537522
// ...
538523
}
539524
}
540-
541525
{% endhighlight %}
542526

543527
`Codeception\Scenario` is also available in Actor classes and StepObjects. You can access it with `$this->getScenario()`.
@@ -628,7 +612,7 @@ You can pass the `-c` option to any Codeception command (except `bootstrap`), to
628612
629613
$ php vendor/bin/codecept run -c ~/projects/ecommerce/
630614
$ php vendor/bin/codecept run -c ~/projects/drupal/
631-
$ php vendor/bin/codecept generate:cept acceptance CreateArticle -c ~/projects/drupal/
615+
$ php vendor/bin/codecept generate:cest acceptance CreateArticle -c ~/projects/drupal/
632616
633617
{% endhighlight %}
634618
@@ -678,18 +662,6 @@ public function testAdminUser()
678662
679663
{% endhighlight %}
680664
681-
For Cept files, use pseudo-annotations in comments:
682-
683-
{% highlight php %}
684-
685-
<?php
686-
// @group admin
687-
// @group editor
688-
$I = new AcceptanceTester($scenario);
689-
$I->wantToTest('admin area');
690-
691-
{% endhighlight %}
692-
693665
For `.feature`-files (Gherkin) use tags:
694666
695667
{% highlight gherkin %}
@@ -750,7 +722,7 @@ This will load all found `p*` files in `tests/_data` as groups. Group names will
750722
751723
## Formats
752724
753-
In addition to the standard test formats (Cept, Cest, Unit, Gherkin) you can implement your own format classes to customise your test execution.
725+
In addition to the standard test formats (Cest, Unit, Gherkin) you can implement your own format classes to customise your test execution.
754726
Specify these in your suite configuration:
755727
756728
{% highlight yaml %}

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