Skip to content

bug: W3CMarkupValidator config #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@ The recommended way of module installation is via [composer](https://getcomposer
composer require --dev kolyunya/codeception-markup-validator
```

## Usage with local validation service
You can use [nu html checker](validator.github.io/validator/) to validate your markup locally.
```sh
docker run -it --rm -p 8888:8888 ghcr.io/validator/validator:latest
```

And ajust your provider config
```yaml
class_name: AcceptanceTester
modules:
enabled:
- Kolyunya\Codeception\Module\MarkupValidator:
validator:
class: Kolyunya\Codeception\Lib\MarkupValidator\W3CMarkupValidator
config:
baseUri: 'http://127.0.0.1:8888/'
endpoint: '/'
```

## Usage
Add the module to your acceptance test suit configuration:
```yaml
Expand Down
11 changes: 10 additions & 1 deletion sources/Lib/MarkupValidator/W3CMarkupValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@ public function __construct(array $configuration = array())
{
parent::__construct($configuration);

$this->initializeHttpClient();
$this->initializeHttpRequestParameters();
}

/**
* {@inheritDoc}
*/
public function setConfiguration(array $configuration)
{
parent::setConfiguration($configuration);

$this->initializeHttpClient();
}

/**
* {@inheritDoc}
*/
Expand Down