-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add a readable output to the calls done * feat: mock recalls vars set and also prints them * refac: edits * fix: changed the regex and allowd ->all() = __args * feat: add tests for the mockery of mocks * feat: add ci/codecov * foobar * fix: ci and coverage reports * feat: badges :) * feat: improve tests * feat: dump the contents of the value set * fix: tests to account the colection wrapping * fix: too much arrayness * fix: grammar and readme
- Loading branch information
Showing
13 changed files
with
466 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
composer.lock | ||
vendor | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
dist: xenial | ||
language: php | ||
|
||
env: | ||
global: | ||
- SETUP=stable | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
# - php: 7.2 | ||
- php: 7.2 | ||
env: SETUP=lowest | ||
# - php: 7.3 | ||
- php: 7.3 | ||
env: SETUP=lowest | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- travis_retry composer self-update | ||
|
||
install: | ||
- if [[ $SETUP = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi | ||
- if [[ $SETUP = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi | ||
|
||
script: vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-text | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Example | ||
|
||
```php | ||
<?php | ||
|
||
namespace App; | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
use ReeceM\Mocker\Mocked; | ||
use ReeceM\Mocker\Utils\VarStore; | ||
|
||
$mocked = new Mocked('user', VarStore::singleton()); | ||
$mocked->name->class = 'Chips'; | ||
|
||
echo $mocked->name->class . PHP_EOL; | ||
|
||
echo $mocked->name->class->data . PHP_EOL; | ||
|
||
die(1); | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="Unit"> | ||
<directory suffix="Test.php">./tests/Unit</directory> | ||
</testsuite> | ||
|
||
<testsuite name="Feature"> | ||
<directory suffix="Test.php">./tests/Feature</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<php> | ||
<server name="APP_ENV" value="testing"/> | ||
</php> | ||
<logging> | ||
<log type="coverage-text" target=""/> | ||
<!-- <log type="coverage-clover" target="coverage.xml"/> --> | ||
</logging> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.