Download the PHP package rector/mockstan without Composer

On this page you can find all versions of the php package rector/mockstan. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mockstan

PHPUnit Mocks Rules

Downloads

[!WARNING] This package is deprecated. Use symplify/phpstan-rules instead.

This set is for you!


Install

Note: Make sure you use phpstan/extension-installer to load necessary service configs.


AvoidAnyExpectsRule

Disallow usage of any() expectation in mocks to ensure that all mock interactions are explicitly defined and verified.

:x:

:+1:


ExplicitExpectsMockMethodRule

Require explicit expects() usage when setting up mocks to avoid silent stubs. This is reuired since PHPUnit 12 to avoid silent stubs.

:x:

:+1:


ForbiddenClassToMockRule

Disallow mocking of forbidden/core classes (e.g. \DateTime, Symfony Request or RequestStack, Iterable, Symfony and Doctine event objects etc.).

:x:

:+1:


NoWithOnStubRule

Disallow with() on stubs (mocks without expects()). PHPUnit deprecates with*() on test stubs because they silently swallow argument mismatches.

:x:

:+1:


NoDocumentMockingRule

Prevent mocking of Doctrine ODM document classes. Use real instances instead.

:x:

:+1:


NoDoubleConsecutiveTestMockRule

Avoid creating multiple consecutive methods mocks, one for params and other for return. Use single instead.

:x:

:+1:


NoEntityMockingRule

Do not mock Doctrine entity classes. Use real object instance instead.

:x:

:+1:


NoMockObjectAndRealObjectPropertyRule

Disallow assigning a mock to a property while another test uses the real object on the same property.

:x:

:+1:


RequireAtLeastOneRule

Disallow atLeast(0) on mock expectations, as it matches any number of calls (including zero) and provides no real verification. Require a value of 1 or higher.

:x:

:+1:


NoMockOnlyTestRule

Avoid tests that only create mocks and never assert behavior. Require meaningful assertions with at least once real object to test.

:x:

:+1:


Happy coding!


All versions of mockstan with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
phpstan/phpstan Version ^2.1.38
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rector/mockstan contains the following files

Loading the files please wait ...