<commit_before>Mocka
=====

Status
------
[![Travis Build](https://api.travis-ci.org/tomaszdurka/mocka.png)](https://travis-ci.org/tomaszdurka/mocka)
[![Coverage Status](https://coveralls.io/repos/tomaszdurka/mocka/badge.png)](https://coveralls.io/r/tomaszdurka/mocka)

Installation
------------

Mocka is registered as composer package on [packagist](https://packagist.org/packages/tomaszdurka/mocka).
```
"tomaszdurka/mocka": "dev-master"
```

Library usage
-----

Mocking classes

```php
$parentClassName = 'Exception';
$class = new ClassMock('MockedException', $parentClassName);
$exception1 = $class->newInstance(['exception message as constructor argument']);
$exception2 = $class->newInstanceWithoutConstructor();
```

Creating object of mocked classes

```php
$class = new ClassMock('MockedException', 'Exception');
$object = $class->newInstance('message');<commit_msg>Add about section<commit_after>Mocka
=====

[![Travis Build](https://api.travis-ci.org/tomaszdurka/mocka.png)](https://travis-ci.org/tomaszdurka/mocka)
[![Coverage Status](https://coveralls.io/repos/tomaszdurka/mocka/badge.png)](https://coveralls.io/r/tomaszdurka/mocka)

About
-----
Mocka is clean, structured, but still very flexible mocking framework.
It follows object-oriented guidelines to create mock classes, objects and their methods. Mocks can be modified during runtime before and once created or used.
It has no assertion, expectations framework built-in - still fits well into any testing framework.


Installation
------------

Mocka is registered as composer package on [packagist](https://packagist.org/packages/tomaszdurka/mocka).
```
"tomaszdurka/mocka": "dev-master"
```

Library usage
-----

Mocking classes

```php
$parentClassName = 'Exception';
$class = new ClassMock('MockedException', $parentClassName);
$exception1 = $class->newInstance(['exception message as constructor argument']);
$exception2 = $class->newInstanceWithoutConstructor();
```

Creating object of mocked classes

```php
$class = new ClassMock('MockedException', 'Exception');
$object = $class->newInstance('message');
{'fraction_non_alphanumeric': 0.16674652611403928, 'fraction_numerical': 0.0019166267369429804, 'mean_word_length': 5.484472049689441, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5021784', 'n_tokens_mistral': 659, 'n_tokens_neox': 639, 'n_words': 145}