Download the PHP package ksfraser/famock without Composer

On this page you can find all versions of the php package ksfraser/famock. 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 famock

FAMock

FrontAccounting function mocks for unit testing PHP modules that depend on FrontAccounting functions.

Purpose

When writing unit tests for FrontAccounting modules, you often need to mock FA-specific functions that are not available in the test environment. FAMock provides stub implementations of these functions so your tests can run without requiring a full FA installation.

Installation

Option 1: Packagist (when published)

Option 2: GitHub Repository (requires authentication)

Add to your composer.json:

Note: Requires GitHub authentication token for private repositories.

Option 3: Local Path (recommended for development)

Usage

In your test bootstrap or test file:

This will load all FA function stubs.

Available Stubs

Database Functions (FaDbStubs.php)

UI Functions (FaUIStubs.php)

Hook System (FaHookStubs.php)

Security Functions (FaSecurityStubs.php)

Session/Company (FaSessionStubs.php)

Preferences (FaUpdateOnlyStubs.php)

Transaction Write Functions (FaWriteStubs.php)

Mock Classes

Contributing

When adding new FA function mocks:

  1. Create a new stub file following the SRP pattern (e.g., FaNewCategoryStubs.php)
  2. Use if (!function_exists('function_name')) to check if already defined
  3. Add the file to FAMock.php
  4. Update this README

Publishing

To publish to Packagist:

  1. Push to GitHub: git push origin main
  2. Go to https://packagist.org/packages/submit
  3. Submit the GitHub repository URL: https://github.com/ksfraser/FAMock
  4. Tag a release: git tag v0.2.0 && git push --tags

Once published, users can install with: composer require ksfraser/famock --dev

Current Status: FAMock is ready for publishing but currently uses local path installation for development.


All versions of famock with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
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 ksfraser/famock contains the following files

Loading the files please wait ...