aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/behat.yml27
-rw-r--r--tests/acceptance/features/bootstrap/AdminContext.php23
-rw-r--r--tests/acceptance/features/bootstrap/ApiContext.php23
-rw-r--r--tests/acceptance/features/bootstrap/FeatureContext.php23
-rw-r--r--tests/acceptance/features/login_local.feature18
-rw-r--r--tests/unit/UnitTestCase.php3
6 files changed, 1 insertions, 116 deletions
diff --git a/tests/acceptance/behat.yml b/tests/acceptance/behat.yml
deleted file mode 100644
index 933571e5e..000000000
--- a/tests/acceptance/behat.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-default:
- suites:
- default:
- paths:
- - %paths.base%/features
- contexts:
- - Behat\MinkExtension\Context\MinkContext
- admin_features:
- filters: { role: admin }
- contexts:
- - AdminContext
- api_features:
- paths:
- - %paths.base%/features/api
- filters:
- tags: "@api"
- contexts:
- - ApiContext
- gherkin:
- filters:
- tags: ~@wip
- extensions:
- Behat\MinkExtension:
- base_url: 'http://localhost'
- sessions:
- default:
- goutte: ~
diff --git a/tests/acceptance/features/bootstrap/AdminContext.php b/tests/acceptance/features/bootstrap/AdminContext.php
deleted file mode 100644
index aa4dced67..000000000
--- a/tests/acceptance/features/bootstrap/AdminContext.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-use Behat\Behat\Context\Context;
-use Behat\Behat\Context\SnippetAcceptingContext;
-use Behat\Gherkin\Node\PyStringNode;
-use Behat\Gherkin\Node\TableNode;
-
-/**
- * Defines application features from the specific context.
- */
-class AdminContext implements Context, SnippetAcceptingContext
-{
- /**
- * Initializes context.
- *
- * Every scenario gets its own context instance.
- * You can also pass arbitrary arguments to the
- * context constructor through behat.yml.
- */
- public function __construct()
- {
- }
-}
diff --git a/tests/acceptance/features/bootstrap/ApiContext.php b/tests/acceptance/features/bootstrap/ApiContext.php
deleted file mode 100644
index 9b772b209..000000000
--- a/tests/acceptance/features/bootstrap/ApiContext.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-use Behat\Behat\Context\Context;
-use Behat\Behat\Context\SnippetAcceptingContext;
-use Behat\Gherkin\Node\PyStringNode;
-use Behat\Gherkin\Node\TableNode;
-
-/**
- * Defines application features from the specific context.
- */
-class ApiContext implements Context, SnippetAcceptingContext
-{
- /**
- * Initializes context.
- *
- * Every scenario gets its own context instance.
- * You can also pass arbitrary arguments to the
- * context constructor through behat.yml.
- */
- public function __construct()
- {
- }
-}
diff --git a/tests/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/features/bootstrap/FeatureContext.php
deleted file mode 100644
index 2ec02da85..000000000
--- a/tests/acceptance/features/bootstrap/FeatureContext.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-use Behat\Behat\Context\Context;
-use Behat\Behat\Context\SnippetAcceptingContext;
-use Behat\Gherkin\Node\PyStringNode;
-use Behat\Gherkin\Node\TableNode;
-
-/**
- * Defines application features from the specific context.
- */
-class FeatureContext implements Context, SnippetAcceptingContext
-{
- /**
- * Initializes context.
- *
- * Every scenario gets its own context instance.
- * You can also pass arbitrary arguments to the
- * context constructor through behat.yml.
- */
- public function __construct()
- {
- }
-}
diff --git a/tests/acceptance/features/login_local.feature b/tests/acceptance/features/login_local.feature
deleted file mode 100644
index a7814b8f6..000000000
--- a/tests/acceptance/features/login_local.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-Feature: Local login
- In order to login locally
- As a member
- I need to successfully authenticate
-
- Scenario: Provide wrong credentials
- Given I am on "/login"
- When I fill in "id_username" with "foo"
- And I fill in "id_password" with "bar"
- And I press "submit"
- Then I should be on "/login"
-
- Scenario: Provide correct credentials
- Given I am on "/login"
- When I fill in "id_username" with "behat"
- And I fill in "id_password" with "behat"
- And I press "submit"
- Then I should be on "/apps"
diff --git a/tests/unit/UnitTestCase.php b/tests/unit/UnitTestCase.php
index 2ef414cb5..b98845985 100644
--- a/tests/unit/UnitTestCase.php
+++ b/tests/unit/UnitTestCase.php
@@ -23,7 +23,6 @@
namespace Zotlabs\Tests\Unit;
use PHPUnit\Framework\TestCase;
-use Symfony\Component\Yaml\Yaml;
/*
* Make sure global constants and the global App object is available to the
@@ -115,7 +114,7 @@ class UnitTestCase extends TestCase {
private function loadFixture($file) : void {
$table_name = basename($file, '.yml');
- $this->fixtures[$table_name] = Yaml::parseFile($file)[$table_name];
+ $this->fixtures[$table_name] = yaml_parse_file($file)[$table_name];
//echo "\n[*] Loaded fixture '{$table_name}':\n";
// . print_r($this->fixtures[$table_name], true)