Download the PHP package ajant/db-mock-library without Composer

On this page you can find all versions of the php package ajant/db-mock-library. 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 db-mock-library

DbMockLibrary

Build Status Coverage Status

Db mocking & dummy data management library

Wiki

This is a database stubbing/mocking/prototyping library. Its principal uses are meant to be:

  1. testing the application without using actual database (by mocking data persistence layer, using DbMockLibrary)

  2. quick prototyping, while delaying the writing of any database specific code (again by mocking data persistence layer, using DbMockLibrary)

  3. dummy data management during development phase

Description:

  1. If data persistence code is kept separate from business logic code, in a different layer of the application, then data persistence layer can be mocked using DbMockLibrary during testing. That way objects that call on data persistence layer can be tested, without actually using a real database. As a result tests are faster and better code & test separation is achieved. DbMockLibrary could be used to mock data persistence layer functionality in the testing environment

  2. When project is in prototyping stage, often making choice on database is not necessarily needed at that time. Sometimes it's even beneficial to postpone the decision for a while during that phase, until some features/architectural solutions take shape. What is needed is to have some "dummy data" available, to test out features and concepts with it. DbMockLibrary provides feature rich "dummy data" platform.

  3. During development, it's often convenient to have some easy way to load/remove "dummy data" from the database, in order to be able to test out features, without having to create dumps from the production database. DbMockLibrary provides a simple way to manage this process for some of the most popular databases

Requirements

You'll need: PHP version 5.4+

Installation

Install the latest version with composer:

Auto-load the library:

As of now MySQL, MongoDb and Elasticsearch databases have been implemented.

Quick start

Here's the example, how to use the library for testing DB features of the application.

MySQL

Bootstrapping:

Test set up:

Test tear down:

Elasticsearch

Note:

It is presumed that all indexes and mappings for records that are to be used in testing are already in Elasticsearch database.

Bootstrapping:

Test set up features:

Test tear down features:


All versions of db-mock-library with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ajant/simple-array-library Version >=2
elasticsearch/elasticsearch Version ~2.0
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 ajant/db-mock-library contains the following files

Loading the files please wait ....