Skip to content
Snippets Groups Projects
Commit f23892ec authored by Robin Gustafsson's avatar Robin Gustafsson
Browse files

[HACK, DO NOT MERGE] Run tests with composer deps

The tests have several dependencies that are not packaged in Debian.
This runs the tests anyway using Composer to fill the gap.

This is VERY HACKY and must never be merged.

It's only meant to give some added confidence in the package until we
can run the test suite properly at build time.
parent 417416e4
No related branches found
No related tags found
No related merge requests found
Pipeline #812610 skipped
{
"name": "laravel/framework",
"version": "10.48.25",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
......@@ -14,16 +15,7 @@
"email": "taylor@laravel.com"
}
],
"require": {
"php": "^8.1",
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-session": "*",
"ext-tokenizer": "*",
"composer-runtime-api": "^2.2",
"replace": {
"brick/math": "^0.9.3|^0.10.2|^0.11|^0.12",
"doctrine/inflector": "^2.0.5",
"dragonmantank/cron-expression": "^3.3.2",
......@@ -54,9 +46,7 @@
"symfony/var-dumper": "^6.2",
"tijsverkoyen/css-to-inline-styles": "^2.2.5",
"vlucas/phpdotenv": "^5.4.1",
"voku/portable-ascii": "^2.0"
},
"replace": {
"voku/portable-ascii": "^2.0",
"illuminate/auth": "self.version",
"illuminate/broadcasting": "self.version",
"illuminate/bus": "self.version",
......
#!/bin/zsh
autopkgtest \
--test-name hack-phpunit.sh \
../php-{laravel-framework,illuminate-,ramsey-uuid}*.deb \
. \
-- schroot sid-amd64-sbuild
Tests: hack-phpunit.sh
Restrictions: allow-stderr
Depends:
composer,
php-cli,
php-curl,
php-gd,
php-gmp,
php-laravel-framework,
php-mysql,
php-sqlite3,
phpab,
pkg-php-tools,
tzdata-legacy,
tzdata,
unzip,
Test-Command: php -r 'require_once "Illuminate/autoload.php";'
Restrictions: superficial
Features: test-name=load_php-laravel-framework
......
#!/bin/sh
set -x
set -e
composer install --dev
sed -i 's|<?php|<?php require_once("tests/autoload.php");|' \
vendor/orchestra/testbench-core/testbench
phpabtpl --require-file /usr/share/php/Illuminate/autoload.php \
--require-file ../vendor/autoload.php \
> debian/autoload.php.test.tpl
phpab \
-t debian/autoload.php.test.tpl \
-o tests/autoload.php \
--blacklist *foocontroller* \
tests
vendor/bin/phpunit --bootstrap tests/autoload.php
......@@ -157,6 +157,7 @@ class CommandSchedulingTest extends TestCase
define('LARAVEL_START', microtime(true));
require_once '/usr/share/php/Illuminate/autoload.php';
require __DIR__.'/../../../autoload.php';
\$app = require_once __DIR__.'/bootstrap/app.php';
......
......@@ -134,6 +134,7 @@ class ExceptionHandlerTest extends TestCase
$process = new PhpProcess(<<<EOF
<?php
require_once '/usr/share/php/Illuminate/autoload.php';
require 'vendor/autoload.php';
\$laravel = Orchestra\Testbench\Foundation\Application::create(basePath: '$basePath', options: ['extra' => ['providers' => $providers]]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment