Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ jobs:
while ! nc -z localhost 8080 </dev/null; do echo Waiting for PHP server to start...; sleep 1; done
timeout-minutes: 1
- name: Run behat tests
run: ./bin/behat -fprogress --no-interaction --profile=${{ matrix.profile }}
run: ./bin/behat -fprogress --no-interaction --profile=${{ matrix.profile }} --strict
4 changes: 2 additions & 2 deletions src/Json/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\PropertyAccess\PropertyAccessor;

class Json
class Json implements \Stringable
{
protected $content;

Expand Down Expand Up @@ -45,7 +45,7 @@ public function encode($pretty = true)
return json_encode($this->content, $flags);
}

public function __toString()
public function __toString(): string
{
return $this->encode(false);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Xml/Dom.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Behatch\Xml;

class Dom
class Dom implements \Stringable
{
private $dom;

Expand All @@ -16,7 +16,7 @@ public function __construct($content)
$this->throwError();
}

public function __toString()
public function __toString(): string
{
$this->dom->formatOutput = true;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
Feature: Browser Feature

# If this scenario fails
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
Feature: Browser Feature

@user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
@json
Feature: Testing JSONContext

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
@rest
Feature: Testing RESTContext

Expand Down Expand Up @@ -100,7 +101,7 @@ Feature: Testing RESTContext

Scenario: Accept header should not be set by dfault
When I send a GET request to "/rest/index.php"
Then I should not see "HTTP_ACCEPT"
Then I should not see "HTTP_ACCEPT :"

@>php5.5
Scenario: Set content headers in POST request
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
Feature: System feature

Scenario: Testing execution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
Feature: Browser Feature

Scenario: Testing access to /table/index.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# language: en
@xml
Feature: Testing XmlContext

Expand Down
8 changes: 4 additions & 4 deletions tests/features/ja/browser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@javascript
シナリオ: Testing simple web access
前提 "/index.html" を表示している
ならば 画面に "Congratulations, you've correctly set up your apache environment." と表示されていること
ならば 画面に "Congratulations, you've correctly set up your apache environment." と表示されていること

@statusCode
シナリオ: Basic authentication
Expand Down Expand Up @@ -65,9 +65,9 @@
ならば 私が"timeout"を見るまで3秒間待つ
かつ 私が1秒間待つ
かつ 私が"#iframe"要素を見るまで待つ
かつ 私が "#iframe" 要素を見るまで 5 秒間待つ
かつ 私が "#iframe" 要素を見るまで 5 秒待つ
かつ "#iframe" 要素を見るまで 5 秒待つ
かつ 私が "#iframe" 要素を見るまで 5 秒間待つ
かつ 私が "#iframe" 要素を見るまで 5 秒待つ
かつ "#iframe" 要素を見るまで 5 秒待つ

@javascript
シナリオ: Check element visibility
Expand Down