Coder Social home page Coder Social logo

module-asserts's Introduction

Codeception Module Asserts

Actions Status Latest Stable Version Total Downloads License

A Codeception module containing various assertions.

Requirements

  • PHP 8.0 or higher.

Installation

composer require "codeception/module-asserts" --dev

Documentation

See the module documentation.

Changelog

License

Codeception Module Asserts is open-sourced software licensed under the MIT License.

© Codeception PHP Testing Framework

module-asserts's People

Contributors

arhell avatar b1rdex avatar b4rb4ross4 avatar burned42 avatar davertmik avatar dbwhddn10 avatar exorus avatar great-antique avatar guidocella avatar hexoplon avatar hidechae avatar johannesschobel avatar maxakawizard avatar naktibalda avatar rockylars avatar roger-russel avatar slamdunk avatar spideyfusion avatar splinter89 avatar tavoniievez avatar yesdevnull avatar zbateson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

module-asserts's Issues

Conflict with `codeception/codeception` in latest version

I can not install the latest version v2.0.1.

Composer install results in:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires codeception/module-asserts 2.0.1 -> satisfiable by codeception/module-asserts[2.0.1].
    - codeception/module-asserts 2.0.1 requires codeception/lib-asserts ^2.0 -> found codeception/lib-asserts[2.0.0] but the package is fixed to 1.13.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Reason:
Latest version of codeception/codeception (v4.1.24) requires codeception/lib-asserts (^1.0)

v1.2.0 is broken

Codeception PHP Testing Framework v4.1.4
 Powered by PHPUnit 8.5.3 by Sebastian Bergmann and contributors.
 Running with seed: 
 Fatal error: The modifiers of the trait method assertMatchesRegularExpression() are changed, but this method does not exist. Error in /builds/redacted/redacted/vendor/codeception/module-asserts/src/Codeception/Module/Asserts.php on line 11

Does 2.0.1 require PHPUnit ^9?

I started getting errors after this upgrade, i.e.

[Error] Call to undefined method Codeception\PHPUnit\TestCase::assertMatchesRegularExpression() 

going down the rabbit hole, it seems like this is going through the phpunit wrapper to a method in phpunit with the same name, but assertMatchesRegularExpression wasn't present in phpunit ^8. Trying to force phpunit to 9.5 results in:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires phpunit/phpunit ^9.5, found phpunit/phpunit[9.5.0, ..., 9.5.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - codeception/phpunit-wrapper 8.1.6 requires phpunit/phpunit ^8.0 -> found phpunit/phpunit[8.0.0, ..., 8.5.x-dev] but it conflicts with your root composer.json require (^9.5).
    - codeception/codeception 4.2.2 requires codeception/phpunit-wrapper >6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1 | ^9.0 -> satisfiable by codeception/phpunit-wrapper[8.1.6].
    - codeception/codeception is locked to version 4.2.2 and an update of this package was not requested.

Am I missing something here?

Using codeception 4.2.2, php 8.0, phpunit 8.5.30, lib-asserts 1.13.2, module-asserts 1.3.1

PHPStan is saying expectThrowable wants Exception classes based on _generated\Throwable instead of simply PHP's Throwable

Hey there, this is in relation to #13. This may be similar to #9 which is from our prior colleague.
image

I would expect that expectThrowable would simply accept Throwable. It is impossible for us to make copies of every error class just so that it works with this weird new Throwable. If i look at your code, i can see that you're also expecting the PHP one. Something may just have gone wrong by using the use statement instead of the backslash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.