Remove behat as dev dependency.

As the Symphony\Yaml stuff disappeared with behat, we need another way
to load read the yaml files with database fixtures for the integration
tests.

As the php yaml extension is not distributed with PHP by default, this
creates it as another dev dependency!
This commit is contained in:
Harald Eilertsen
2024-01-07 19:46:14 +01:00
parent 659a8c967c
commit 0a31fc176c
6 changed files with 14 additions and 2043 deletions

23
.gitignore vendored
View File

@@ -82,20 +82,16 @@ vendor/**/Test/
vendor/sabre/*/examples/ vendor/sabre/*/examples/
# Exclude dev dependencies # Exclude dev dependencies
vendor/behat/
vendor/bin/behat
vendor/bin/pdepend vendor/bin/pdepend
vendor/bin/php-parse vendor/bin/php-parse
vendor/bin/phpcbf vendor/bin/phpcbf
vendor/bin/phpcs vendor/bin/phpcs
vendor/bin/phpmd vendor/bin/phpmd
vendor/bin/phpunit vendor/bin/phpunit
vendor/bin/yaml-lint
vendor/composer/pcre/ vendor/composer/pcre/
vendor/composer/xdebug-handler/ vendor/composer/xdebug-handler/
vendor/dms/ vendor/dms/
vendor/doctrine/ vendor/doctrine/
vendor/fabpot/
vendor/myclabs/ vendor/myclabs/
vendor/nikic/ vendor/nikic/
vendor/pdepend/ vendor/pdepend/
@@ -104,35 +100,16 @@ vendor/php-mock/
vendor/phpmd/ vendor/phpmd/
vendor/phpunit/ vendor/phpunit/
vendor/psr/container/ vendor/psr/container/
vendor/psr/event-dispatcher/
vendor/sebastian/ vendor/sebastian/
vendor/squizlabs/ vendor/squizlabs/
vendor/symfony/browser-kit/
vendor/symfony/config/ vendor/symfony/config/
vendor/symfony/console/
vendor/symfony/css-selector/
vendor/symfony/dependency-injection/ vendor/symfony/dependency-injection/
vendor/symfony/deprecation-contracts/ vendor/symfony/deprecation-contracts/
vendor/symfony/dom-crawler/
vendor/symfony/event-dispatcher-contracts/
vendor/symfony/event-dispatcher/
vendor/symfony/filesystem/ vendor/symfony/filesystem/
vendor/symfony/http-client-contracts/
vendor/symfony/http-client/
vendor/symfony/mime/
vendor/symfony/polyfill-ctype/ vendor/symfony/polyfill-ctype/
vendor/symfony/polyfill-intl-grapheme/
vendor/symfony/polyfill-intl-idn/
vendor/symfony/polyfill-intl-normalizer/
vendor/symfony/polyfill-mbstring/ vendor/symfony/polyfill-mbstring/
vendor/symfony/polyfill-php72/
vendor/symfony/polyfill-php73/
vendor/symfony/polyfill-php80/ vendor/symfony/polyfill-php80/
vendor/symfony/service-contracts/ vendor/symfony/service-contracts/
vendor/symfony/string/
vendor/symfony/translation-contracts/
vendor/symfony/translation/
vendor/symfony/yaml/
vendor/theseer/ vendor/theseer/
# /info is a directory containing site-specific HTML documents # /info is a directory containing site-specific HTML documents
/info/ /info/

View File

@@ -29,9 +29,9 @@ before_script:
# Install & enable Xdebug for code coverage reports # Install & enable Xdebug for code coverage reports
- pecl install xdebug - pecl install xdebug
- apt-get update - apt-get update
- apt-get install -yqq libjpeg-dev libpng-dev libpq-dev libzip-dev mariadb-client postgresql-client unzip zip - apt-get install -yqq libjpeg-dev libpng-dev libpq-dev libyaml-dev libzip-dev mariadb-client postgresql-client unzip zip
- docker-php-ext-enable xdebug - docker-php-ext-enable xdebug
- docker-php-ext-install gd bcmath pdo_mysql pdo_pgsql zip - docker-php-ext-install gd bcmath pdo_mysql pdo_pgsql yaml zip
# Install composer # Install composer
- curl -sS https://getcomposer.org/installer | php - curl -sS https://getcomposer.org/installer | php

View File

@@ -56,10 +56,8 @@
"mmccook/php-json-canonicalization-scheme": "^1.0" "mmccook/php-json-canonicalization-scheme": "^1.0"
}, },
"require-dev": { "require-dev": {
"ext-yaml": "*",
"phpunit/phpunit": "^9.4", "phpunit/phpunit": "^9.4",
"behat/behat": "@stable",
"behat/mink-extension": "@stable",
"behat/mink-goutte-driver": "@stable",
"php-mock/php-mock-phpunit": "^2.6", "php-mock/php-mock-phpunit": "^2.6",
"phpmd/phpmd": "^2.6", "phpmd/phpmd": "^2.6",
"squizlabs/php_codesniffer": "*", "squizlabs/php_codesniffer": "*",

2019
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,6 @@
namespace Zotlabs\Tests\Unit; namespace Zotlabs\Tests\Unit;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Component\Yaml\Yaml;
/* /*
* Make sure global constants and the global App object is available to the * 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 { private function loadFixture($file) : void {
$table_name = basename($file, '.yml'); $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"; //echo "\n[*] Loaded fixture '{$table_name}':\n";
// . print_r($this->fixtures[$table_name], true) // . print_r($this->fixtures[$table_name], true)

View File

@@ -3,7 +3,7 @@
'name' => 'zotlabs/hubzilla', 'name' => 'zotlabs/hubzilla',
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => 'ed0d2fed66355a289d50a96023c67da4682a44be', 'reference' => '659a8c967cff97e81c3b8defe047437838b7dff4',
'type' => 'application', 'type' => 'application',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -331,7 +331,7 @@
'zotlabs/hubzilla' => array( 'zotlabs/hubzilla' => array(
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => 'ed0d2fed66355a289d50a96023c67da4682a44be', 'reference' => '659a8c967cff97e81c3b8defe047437838b7dff4',
'type' => 'application', 'type' => 'application',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),