sebastianbergmann / phpunit

The PHP Unit Testing framework.
https://phpunit.de/
BSD 3-Clause "New" or "Revised" License
19.69k stars 2.2k forks source link

PHPunit - sqlite - All tests suddenly started failing #3591

Closed DeBelserArne closed 5 years ago

DeBelserArne commented 5 years ago
Q A
PHPUnit version 7.5.8
PHP version 7.2.10
Installation Method Composer

Hello there, I have a testsuite which was working up untill now, suddenly all my tests either return:

Session is missing expected key [errors].
Failed asserting that false is true.

Or

Failed asserting that a row in the table [******] matches the attributes {
    "landcode": "BE",
    "ringnumber": "751705225"
}.

I'm wondering if anyone came across the same issue? I think that my app might not be initialized properly and the sqlite database seems to be corrupt.

$ composer info | sort
albertcht/invisible-recaptcha         v1.9.1   Invisible reCAPTCHA For Laravel.
bacon/bacon-qr-code                   2.0.0    BaconQrCode is a QR code generator for PHP.
barryvdh/laravel-debugbar             v3.2.3   PHP Debugbar integration for Laravel
beyondcode/dusk-dashboard             1.1.0    A beautiful dashboard for your Laravel Dusk tests
beyondcode/laravel-dump-server        1.2.2    Symfony Var-Dump Server for Laravel
beyondcode/laravel-websockets         1.1.1    An easy to use WebSocket server
cakephp/chronos                       1.2.4    A simple API extension for DateTime.
cboden/ratchet                        v0.4.1   PHP WebSocket library
clue/buzz-react                       v2.6.0   Simple, async PSR-7 HTTP client for concurrently processing any number of HTTP requests, built on top of ReactPHP
composer/semver                       1.5.0    Semver library that offers utilities, version constraint parsing and validation.
composer/xdebug-handler               1.3.2    Restarts a process without xdebug.
dasprid/enum                          1.0.0    PHP 7.1 enum implementation
dnoegel/php-xdg-base-dir              0.1      implementation of xdg base directory specification for php
doctrine/annotations                  v1.6.1   Docblock Annotations Parser
doctrine/cache                        v1.8.0   Caching library offering an object-oriented API for many cache backends
doctrine/dbal                         v2.9.2   Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/event-manager                v1.0.0   Doctrine Event Manager component
doctrine/inflector                    v1.3.0   Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                 1.2.0    A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                        v1.0.1   Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
dompdf/dompdf                         v0.8.3   DOMPDF is a CSS 2.1 compliant HTML to PDF converter
dragonmantank/cron-expression         v2.3.0   CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
egulias/email-validator               2.1.7    A library for validating emails against several RFCs
erusev/parsedown                      1.7.3    Parser for Markdown.
evenement/evenement                   v3.0.1   Événement is a very simple event dispatching library for PHP
facebook/webdriver                    1.6.0    A PHP client for Selenium WebDriver
fideloper/proxy                       4.1.0    Set trusted proxies for Laravel
filp/whoops                           2.3.1    php error handling for cool kids
friendsofphp/php-cs-fixer             v2.14.2  A tool to automatically fix PHP code style
fzaninotto/faker                      v1.8.0   Faker is a PHP library that generates fake data for you.
guzzlehttp/guzzle                     6.3.3    Guzzle is a PHP HTTP client library
guzzlehttp/promises                   v1.3.1   Guzzle promises library
guzzlehttp/psr7                       1.5.2    PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php                 v2.0.0   This is the PHP port of Hamcrest Matchers
intervention/image                    2.4.2    Image handling and manipulation library with support for Laravel integration
jakub-onderka/php-console-color       v0.2
jakub-onderka/php-console-highlighter v0.4     Highlight PHP code in terminal
kyslik/column-sortable                5.7.0    Package for handling column sorting in Laravel 5.x
laracasts/flash                       3.0.2    Easy flash notifications
laravel/cashier                       v9.2.1   Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
laravel/dusk                          v5.0.3   Laravel Dusk provides simple end-to-end testing and browser automation.
laravel/framework                     v5.7.28  The Laravel Framework.
laravel/homestead                     v7.20.0  A virtual machine for web artisans.
laravel/horizon                       v2.2.2   Dashboard and code-driven configuration for Laravel queues.
laravel/nexmo-notification-channel    v1.0.1   Nexmo Notification Channel for laravel.
laravel/slack-notification-channel    v1.0.3   Slack Notification Channel for laravel.
laravel/tinker                        v1.0.8   Powerful REPL for the Laravel framework.
laravelcollective/html                v5.7.1   HTML and Form Builders for the Laravel Framework
lcobucci/jwt                          3.2.5    A simple library to work with JSON Web Token and JSON Web Signature
league/flysystem                      1.0.51   Filesystem abstraction: Many filesystems, one API.
league/glide                          1.5.0    Wonderfully easy on-demand image manipulation library with an HTTP based API.
maatwebsite/excel                     3.1.11   Supercharged Excel exports and imports in Laravel
maennchen/zipstream-php               v0.5.2   ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.
markbaker/complex                     1.4.7    PHP Class for working with complex numbers
markbaker/matrix                      1.1.4    PHP Class for working with matrices
maximebf/debugbar                     v1.15.0  Debug bar in the browser for php application
mcamara/laravel-localization          1.3.19   Easy localization for Laravel
mockery/mockery                       1.2.2    Mockery is a simple yet flexible PHP mock object framework
monolog/monolog                       1.24.0   Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy                     1.8.1    Create deep copies (clones) of your objects
nesbot/carbon                         1.36.2   A simple API extension for DateTime.
nexmo/client                          1.6.3    PHP Client for using Nexmo's API.
nikic/php-parser                      v4.2.1   A PHP parser written in PHP
nunomaduro/collision                  v2.1.1   Cli error handling for console/command-line PHP applications.
opis/closure                          3.1.6    A library that can be used to serialize closures (anonymous functions) and arbitrary objects.
overtrue/laravel-follow               1.1.11   Laravel 5 User Based System
paragonie/constant_time_encoding      v2.2.3   Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)
paragonie/random_compat               v9.99.99 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
paragonie/sodium_compat               v1.9.1   Pure PHP implementation of libsodium; uses the PHP extension if it exists
phar-io/manifest                      1.0.3    Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                       2.0.1    Library for handling version information and constraints
phenx/php-font-lib                    0.5.1    A library to read, parse, export and make subsets of different types of font files.
phenx/php-svg-lib                     v0.3.2   A library to read, parse and export to PDF SVG files.
php-cs-fixer/diff                     v1.3.0   sebastian/diff v2 backport support for PHP5.6
phpdocumentor/reflection-common       1.0.1    Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock     4.3.0    With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver           0.4.0
php-http/guzzle6-adapter              v1.1.1   Guzzle 6 HTTP Adapter
php-http/httplug                      v1.1.0   HTTPlug, the HTTP client abstraction for PHP
php-http/promise                      v1.0.0   Promise used for asynchronous HTTP requests
phpoffice/phpspreadsheet              1.6.0    PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
phpspec/prophecy                      1.8.0    Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage             6.1.4    Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator             2.0.2    FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template             1.2.1    Simple template engine.
phpunit/php-timer                     2.1.1    Utility class for timing
phpunit/php-token-stream              3.0.1    Wrapper around PHP's tokenizer extension.
phpunit/phpunit                       7.5.8    The PHP Unit Testing framework.
pragmarx/google2fa                    v5.0.0   A One Time Password Authentication package, compatible with Google Authenticator.
pragmarx/google2fa-laravel            v1.0.1   A One Time Password Authentication package, compatible with Google Authenticator.
pragmarx/google2fa-qrcode             v1.0.3   QR Code package for Google2FA
pragmarx/random                       v0.2.2   Create random chars, numbers, strings
pragmarx/recovery                     v0.1.0   Create recovery codes for two factor auth
predis/predis                         v1.1.1   Flexible and feature-complete Redis client for PHP and HHVM
psr/container                         1.0.0    Common Container Interface (PHP FIG PSR-11)
psr/http-message                      1.0.1    Common interface for HTTP messages
psr/log                               1.1.0    Common interface for logging libraries
psr/simple-cache                      1.0.1    Common interfaces for simple caching
psy/psysh                             v0.9.9   An interactive shell for modern PHP.
pusher/pusher-php-server              v3.4.1   Library for interacting with the Pusher REST API
ralouphie/getallheaders               2.0.5    A polyfill for getallheaders.
ramsey/uuid                           3.8.0    Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
ratchet/rfc6455                       0.2.4    RFC6455 WebSocket protocol handler
react/cache                           v0.5.0   Async, Promise-based cache interface for ReactPHP
react/dns                             v0.4.17  Async DNS resolver for ReactPHP
react/event-loop                      v1.1.0   ReactPHP's core reactor event loop that libraries can use for evented I/O.
react/http-client                     v0.5.9   Event-driven, streaming HTTP client for ReactPHP
react/promise                         v2.7.1   A lightweight implementation of CommonJS Promises/A for PHP
react/promise-stream                  v1.1.1   The missing link between Promise-land and Stream-land for ReactPHP
react/promise-timer                   v1.5.1   A trivial implementation of timeouts for Promises, built on top of ReactPHP.
react/socket                          v1.2.0   Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP
react/stream                          v1.1.0   Event-driven readable and writable streams for non-blocking I/O in ReactPHP
ringcentral/psr7                      1.2.2    PSR-7 message implementation
sabberworm/php-css-parser             8.1.0    Parser for CSS Files written in PHP
sebastian/code-unit-reverse-lookup    1.0.1    Looks up which function or method a line of code belongs to
sebastian/comparator                  3.0.2    Provides the functionality to compare PHP values for equality
sebastian/diff                        3.0.2    Diff implementation
sebastian/environment                 4.1.0    Provides functionality to handle HHVM/PHP environments
sebastian/exporter                    3.1.0    Provides the functionality to export PHP variables for visualization
sebastian/global-state                2.0.0    Snapshotting of global state
sebastian/object-enumerator           3.0.3    Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector            1.1.1    Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context           3.0.0    Provides functionality to recursively process PHP variables
sebastian/resource-operations         2.0.1    Provides a list of PHP built-in functions that operate on resources
sebastian/version                     2.0.1    Library that helps with managing the version number of Git-hosted PHP projects
spatie/browsershot                    3.27.0   Convert a webpage to an image or pdf using headless Chrome
spatie/db-dumper                      2.13.2   Dump databases
spatie/image                          1.7.0    Manipulate images with an expressive API
spatie/image-optimizer                1.1.5    Easily optimize images using PHP
spatie/laravel-backup                 5.12.1   A Laravel 5 package to backup your application
spatie/laravel-medialibrary           7.6.0    Associate files with Eloquent models
spatie/pdf-to-image                   1.2.2    Convert a pdf to an image
spatie/temporary-directory            1.1.4    Easily create, use and destroy temporary directories
stripe/stripe-php                     v6.31.3  Stripe PHP Library
swiftmailer/swiftmailer               v6.2.0   Swiftmailer, free feature-rich PHP mailer
symfony/console                       v4.2.5   Symfony Console Component
symfony/contracts                     v1.0.2   A set of abstractions extracted out of the Symfony components
symfony/css-selector                  v4.2.5   Symfony CssSelector Component
symfony/debug                         v4.2.5   Symfony Debug Component
symfony/event-dispatcher              v4.2.5   Symfony EventDispatcher Component
symfony/filesystem                    v4.2.5   Symfony Filesystem Component
symfony/finder                        v4.2.5   Symfony Finder Component
symfony/http-foundation               v4.2.5   Symfony HttpFoundation Component
symfony/http-kernel                   v4.2.5   Symfony HttpKernel Component
symfony/options-resolver              v4.2.5   Symfony OptionsResolver Component
symfony/polyfill-ctype                v1.11.0  Symfony polyfill for ctype functions
symfony/polyfill-iconv                v1.11.0  Symfony polyfill for the Iconv extension
symfony/polyfill-intl-idn             v1.11.0  Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-mbstring             v1.11.0  Symfony polyfill for the Mbstring extension
symfony/polyfill-php56                v1.11.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70                v1.11.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-php72                v1.11.0  Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-util                 v1.11.0  Symfony utilities for portability of PHP codes
symfony/process                       v4.2.5   Symfony Process Component
symfony/psr-http-message-bridge       v1.2.0   PSR HTTP message bridge
symfony/routing                       v4.2.5   Symfony Routing Component
symfony/stopwatch                     v4.2.5   Symfony Stopwatch Component
symfony/translation                   v4.2.5   Symfony Translation Component
symfony/var-dumper                    v4.2.5   Symfony mechanism for exploring and dumping PHP variables
symfony/yaml                          v4.2.5   Symfony Yaml Component
theseer/tokenizer                     1.1.2    A small library for converting tokenized PHP source code into XML and potentially other formats
tijsverkoyen/css-to-inline-styles     2.2.1    CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you'...
vlucas/phpdotenv                      v2.6.1   Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
webmozart/assert                      1.4.0    Assertions to validate method input/output with nice error messages.
yosymfony/resource-watcher            v1.3.0   A simple resource watcher using Symfony Finder
zendframework/zend-diactoros          1.8.6    PSR HTTP Message implementations
DeBelserArne commented 5 years ago

Hello there,

I was using this in the laravel framework, and via setting up $this->withoutExceptionHandling(); and this showed me the error that was crapping up my application. A third party package was causing the app to fail because the need of a linux program.

So I fixed it and I've notified the package maintainer of the problem.