init
This commit is contained in:
3
vendor/codeception/verify/.gitignore
vendored
Normal file
3
vendor/codeception/verify/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
vendor
|
||||
.idea
|
||||
composer.phar
|
||||
16
vendor/codeception/verify/.travis.yml
vendored
Normal file
16
vendor/codeception/verify/.travis.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7
|
||||
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- composer self-update
|
||||
- composer install --prefer-source
|
||||
|
||||
script: vendor/bin/phpunit
|
||||
20
vendor/codeception/verify/LICENSE
vendored
Normal file
20
vendor/codeception/verify/LICENSE
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2015 Codeception PHP Testing Framework
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
107
vendor/codeception/verify/README.md
vendored
Normal file
107
vendor/codeception/verify/README.md
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
Verify
|
||||
======
|
||||
|
||||
BDD Assertions for [PHPUnit][1] and [Codeception][2]
|
||||
|
||||
This is very tiny wrapper for PHPUnit assertions, that are aimed to make tests a bit more readable.
|
||||
With [BDD][3] assertions influenced by [Chai][4], [Jasmine][5], and [RSpec][6] your assertions would be a bit closer to natural language.
|
||||
|
||||
[](https://travis-ci.org/Codeception/Verify) [](https://packagist.org/packages/codeception/verify)
|
||||
|
||||
```php
|
||||
$user = User::find(1);
|
||||
|
||||
// equal
|
||||
verify($user->getName())->equals('davert');
|
||||
verify("user have 5 posts", $user->getNumPosts())->equals(5);
|
||||
verify($user->getNumPosts())->notEquals(3);
|
||||
|
||||
// contains
|
||||
verify('first user is admin', $user->getRoles())->contains('admin');
|
||||
verify("first user is not banned", $user->getRoles())->notContains('banned');
|
||||
|
||||
// greater / less
|
||||
$rate = $user->getRate();
|
||||
verify('first user rate is 7', $rate)->equals(7);
|
||||
|
||||
verify($rate)->greaterThan(5);
|
||||
verify($rate)->lessThan(10);
|
||||
verify($rate)->lessOrEquals(7);
|
||||
verify($rate)->lessOrEquals(8);
|
||||
verify($rate)->greaterOrEquals(7);
|
||||
verify($rate)->greaterOrEquals(5);
|
||||
|
||||
// true / false / null
|
||||
verify($user->isAdmin())->true();
|
||||
verify($user->isBanned())->false();
|
||||
verify($user->invitedBy)->null();
|
||||
verify($user->getPosts())->notNull();
|
||||
|
||||
// empty
|
||||
verify($user->getComments())->isEmpty();
|
||||
verify($user->getRoles())->notEmpty();
|
||||
```
|
||||
|
||||
Shorthands for testing truth/fallacy:
|
||||
|
||||
```php
|
||||
verify_that($user->isActivated());
|
||||
verify_not($user->isBanned());
|
||||
```
|
||||
|
||||
These two functions don't check for strict true/false matching, rather `empty` function is used.
|
||||
`verify_that` checks that result is not empty value, `verify_not` does the opposite.
|
||||
|
||||
## Alternative Syntax
|
||||
|
||||
If you follow TDD/BDD you'd rather use `expect` instead of `verify`. Which are just an alias functions:
|
||||
|
||||
```php
|
||||
expect("user have 5 posts", $user->getNumPosts())->equals(5);
|
||||
expect_that($user->isActive());
|
||||
expect_not($user->isBanned());
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
### Installing via Composer
|
||||
|
||||
Install composer in a common location or in your project:
|
||||
|
||||
```sh
|
||||
curl -s http://getcomposer.org/installer | php
|
||||
```
|
||||
|
||||
Create the `composer.json` file as follows:
|
||||
|
||||
```json
|
||||
"require-dev": {
|
||||
"codeception/verify": "*"
|
||||
}
|
||||
```
|
||||
|
||||
Run the composer installer:
|
||||
|
||||
```sh
|
||||
php composer.phar install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Use in any test `verify` function instead of `$this->assert*` methods.
|
||||
|
||||
## Extending
|
||||
|
||||
`Codeception\Verify` class can be extended with custom assertions. You write your own `verify` function that would instantiate your extended version of Verify class.
|
||||
|
||||
## License
|
||||
|
||||
Verify is open-sourced software licensed under the [MIT][7] License. © Codeception PHP Testing Framework
|
||||
|
||||
[1]: https://phpunit.de/
|
||||
[2]: http://codeception.com/
|
||||
[3]: https://en.wikipedia.org/wiki/Behavior-driven_development
|
||||
[4]: http://chaijs.com/
|
||||
[5]: http://jasmine.github.io/
|
||||
[6]: http://rspec.info/
|
||||
[7]: https://github.com/Codeception/Verify/blob/master/LICENSE
|
||||
32
vendor/codeception/verify/RoboFile.php
vendored
Normal file
32
vendor/codeception/verify/RoboFile.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* This is project's console commands configuration for Robo task runner.
|
||||
*
|
||||
* @see http://robo.li/
|
||||
*/
|
||||
class RoboFile extends \Robo\Tasks
|
||||
{
|
||||
/**
|
||||
* Publishes new Verify release
|
||||
* @param null $newVer
|
||||
*/
|
||||
public function release($newVer = null)
|
||||
{
|
||||
if ($newVer) {
|
||||
$this->say("version updated to $newVer");
|
||||
$this->taskWriteToFile(__DIR__.'/VERSION')
|
||||
->line($newVer)
|
||||
->run();
|
||||
}
|
||||
$version = trim(file_get_contents(__DIR__.'/VERSION'));
|
||||
$this->taskGitStack()
|
||||
->tag($version)
|
||||
->push('origin','master --tags')
|
||||
->run();
|
||||
|
||||
$this->taskGitHubRelease($version)
|
||||
->uri('Codeception/Verify')
|
||||
->askForChanges()
|
||||
->run();
|
||||
}
|
||||
}
|
||||
1
vendor/codeception/verify/VERSION
vendored
Normal file
1
vendor/codeception/verify/VERSION
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0.3.0
|
||||
17
vendor/codeception/verify/composer.json
vendored
Normal file
17
vendor/codeception/verify/composer.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "codeception/verify",
|
||||
"description": "BDD assertion library for PHPUnit",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Bodnarchuk",
|
||||
"email": "davert.php@mailican.com"
|
||||
}
|
||||
],
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"autoload": {
|
||||
"files": ["src/Codeception/function.php"]
|
||||
}
|
||||
}
|
||||
970
vendor/codeception/verify/composer.lock
generated
vendored
Normal file
970
vendor/codeception/verify/composer.lock
generated
vendored
Normal file
@@ -0,0 +1,970 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "ec42d622d6fe342ea7ec95105ef34d59",
|
||||
"content-hash": "14ed13cdc4b5d3c015381e41dd0c8fb1",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3,<8.0-DEV"
|
||||
},
|
||||
"require-dev": {
|
||||
"athletic/athletic": "~0.1.8",
|
||||
"ext-pdo": "*",
|
||||
"ext-phar": "*",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marco Pivetta",
|
||||
"email": "ocramius@gmail.com",
|
||||
"homepage": "http://ocramius.github.com/"
|
||||
}
|
||||
],
|
||||
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
||||
"homepage": "https://github.com/doctrine/instantiator",
|
||||
"keywords": [
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2015-06-14 21:17:01"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "2.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
||||
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dflydev/markdown": "~1.0",
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"phpDocumentor": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike van Riel",
|
||||
"email": "mike.vanriel@naenius.com"
|
||||
}
|
||||
],
|
||||
"time": "2015-02-03 12:10:50"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7",
|
||||
"reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"phpdocumentor/reflection-docblock": "~2.0",
|
||||
"sebastian/comparator": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "~2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Prophecy\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Konstantin Kudryashov",
|
||||
"email": "ever.zet@gmail.com",
|
||||
"homepage": "http://everzet.com"
|
||||
},
|
||||
{
|
||||
"name": "Marcello Duarte",
|
||||
"email": "marcello.duarte@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
||||
"homepage": "https://github.com/phpspec/prophecy",
|
||||
"keywords": [
|
||||
"Double",
|
||||
"Dummy",
|
||||
"fake",
|
||||
"mock",
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2015-08-13 10:07:40"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "2.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
||||
"reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-token-stream": "~1.3",
|
||||
"sebastian/environment": "^1.3.2",
|
||||
"sebastian/version": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-xdebug": ">=2.1.4",
|
||||
"phpunit/phpunit": "~4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.2.1",
|
||||
"ext-xmlwriter": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
||||
"keywords": [
|
||||
"coverage",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-10-06 15:47:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "1.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
|
||||
"reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
||||
"keywords": [
|
||||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2015-06-21 13:08:43"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
||||
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Simple template engine.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
||||
"keywords": [
|
||||
"template"
|
||||
],
|
||||
"time": "2015-06-21 13:50:34"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "1.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
|
||||
"reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2015-06-21 08:01:12"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "1.4.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
|
||||
"reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Wrapper around PHP's tokenizer extension.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2015-09-15 10:49:45"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "4.8.18",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "fa33d4ad96481b91df343d83e8c8aabed6b1dfd3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fa33d4ad96481b91df343d83e8c8aabed6b1dfd3",
|
||||
"reference": "fa33d4ad96481b91df343d83e8c8aabed6b1dfd3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpspec/prophecy": "^1.3.1",
|
||||
"phpunit/php-code-coverage": "~2.1",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-timer": ">=1.0.6",
|
||||
"phpunit/phpunit-mock-objects": "~2.3",
|
||||
"sebastian/comparator": "~1.1",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/environment": "~1.3",
|
||||
"sebastian/exporter": "~1.2",
|
||||
"sebastian/global-state": "~1.0",
|
||||
"sebastian/version": "~1.0",
|
||||
"symfony/yaml": "~2.1|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
"phpunit"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
"homepage": "https://phpunit.de/",
|
||||
"keywords": [
|
||||
"phpunit",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-11-11 11:32:49"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "2.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
||||
"reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"sebastian/exporter": "~1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Mock Object library for PHPUnit",
|
||||
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
||||
"keywords": [
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-10-02 06:51:40"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
|
||||
"reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/diff": "~1.2",
|
||||
"sebastian/exporter": "~1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to compare PHP values for equality",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/comparator",
|
||||
"keywords": [
|
||||
"comparator",
|
||||
"compare",
|
||||
"equality"
|
||||
],
|
||||
"time": "2015-07-26 15:48:44"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
|
||||
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kore Nordmann",
|
||||
"email": "mail@kore-nordmann.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Diff implementation",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/diff",
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"time": "2015-02-22 15:13:53"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
"version": "1.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "6324c907ce7a52478eeeaede764f48733ef5ae44"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44",
|
||||
"reference": "6324c907ce7a52478eeeaede764f48733ef5ae44",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Provides functionality to handle HHVM/PHP environments",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
||||
"keywords": [
|
||||
"Xdebug",
|
||||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2015-08-03 06:14:51"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "7ae5513327cb536431847bcc0c10edba2701064e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
|
||||
"reference": "7ae5513327cb536431847bcc0c10edba2701064e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"sebastian/recursion-context": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to export PHP variables for visualization",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
||||
"keywords": [
|
||||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2015-06-21 07:55:53"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
|
||||
"reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-uopz": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"description": "Snapshotting of global state",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
||||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2015-10-12 03:26:01"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
||||
"reference": "994d4a811bafe801fb06dccbee797863ba2792ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba",
|
||||
"reference": "994d4a811bafe801fb06dccbee797863ba2792ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
}
|
||||
],
|
||||
"description": "Provides functionality to recursively process PHP variables",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
||||
"time": "2015-06-21 08:04:50"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
"version": "1.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/version.git",
|
||||
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
||||
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2015-06-21 13:59:46"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.7.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "4cfcd7a9fceba662b3c036b7d9a91f6197af046c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/4cfcd7a9fceba662b3c036b7d9a91f6197af046c",
|
||||
"reference": "4cfcd7a9fceba662b3c036b7d9a91f6197af046c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.7-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Yaml\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2015-11-18 13:41:01"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
||||
7
vendor/codeception/verify/phpunit.xml
vendored
Normal file
7
vendor/codeception/verify/phpunit.xml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<phpunit colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="Verify">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
307
vendor/codeception/verify/src/Codeception/Verify.php
vendored
Normal file
307
vendor/codeception/verify/src/Codeception/Verify.php
vendored
Normal file
@@ -0,0 +1,307 @@
|
||||
<?php
|
||||
namespace Codeception;
|
||||
|
||||
use PHPUnit_Framework_Assert as a;
|
||||
|
||||
class Verify {
|
||||
|
||||
protected $actual = null;
|
||||
protected $description = '';
|
||||
protected $isFileExpectation = false;
|
||||
|
||||
public function __construct($description)
|
||||
{
|
||||
$descriptionGiven = (func_num_args() == 2);
|
||||
|
||||
if (!$descriptionGiven) {
|
||||
$this->actual = $description;
|
||||
} else {
|
||||
$actual = func_get_args();
|
||||
$this->actual = $actual[1];
|
||||
$this->description = $description;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $isFileExpectation
|
||||
*/
|
||||
public function setIsFileExpectation($isFileExpectation)
|
||||
{
|
||||
$this->isFileExpectation = $isFileExpectation;
|
||||
}
|
||||
|
||||
public function equals($expected, $delta = 0)
|
||||
{
|
||||
if ( ! $this->isFileExpectation ) {
|
||||
a::assertEquals($expected, $this->actual, $this->description, $delta);
|
||||
} else {
|
||||
a::assertFileEquals($expected, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
|
||||
public function notEquals($expected, $delta = 0)
|
||||
{
|
||||
if ( ! $this->isFileExpectation ) {
|
||||
a::assertNotEquals($expected, $this->actual, $this->description, $delta);
|
||||
} else {
|
||||
a::assertFileNotEquals($expected, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
|
||||
public function contains($needle)
|
||||
{
|
||||
a::assertContains($needle, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notContains($needle)
|
||||
{
|
||||
a::assertNotContains($needle, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function greaterThan($expected)
|
||||
{
|
||||
a::assertGreaterThan($expected, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function lessThan($expected)
|
||||
{
|
||||
a::assertLessThan($expected, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function greaterOrEquals($expected)
|
||||
{
|
||||
a::assertGreaterThanOrEqual($expected, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function lessOrEquals($expected)
|
||||
{
|
||||
a::assertLessThanOrEqual($expected, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function true()
|
||||
{
|
||||
a::assertTrue($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function false()
|
||||
{
|
||||
a::assertFalse($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function null()
|
||||
{
|
||||
a::assertNull($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notNull()
|
||||
{
|
||||
a::assertNotNull($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function isEmpty()
|
||||
{
|
||||
a::assertEmpty($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notEmpty()
|
||||
{
|
||||
a::assertNotEmpty($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function hasKey($key)
|
||||
{
|
||||
a::assertArrayHasKey($key, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function hasntKey($key)
|
||||
{
|
||||
a::assertArrayNotHasKey($key, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function isInstanceOf($class)
|
||||
{
|
||||
a::assertInstanceOf($class, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function isNotInstanceOf($class)
|
||||
{
|
||||
a::assertNotInstanceOf($class, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function internalType($type)
|
||||
{
|
||||
a::assertInternalType($type, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notInternalType($type)
|
||||
{
|
||||
a::assertNotInternalType($type, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function hasAttribute($attribute)
|
||||
{
|
||||
if (is_string($this->actual)) {
|
||||
a::assertClassHasAttribute($attribute, $this->actual, $this->description);
|
||||
} else {
|
||||
a::assertObjectHasAttribute($attribute, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
|
||||
public function notHasAttribute($attribute)
|
||||
{
|
||||
if (is_string($this->actual)) {
|
||||
a::assertClassNotHasAttribute($attribute, $this->actual, $this->description);
|
||||
} else {
|
||||
a::assertObjectNotHasAttribute($attribute, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
|
||||
public function hasStaticAttribute($attribute)
|
||||
{
|
||||
a::assertClassHasStaticAttribute($attribute, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notHasStaticAttribute($attribute)
|
||||
{
|
||||
a::assertClassNotHasStaticAttribute($attribute, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function containsOnly($type, $isNativeType = NULL)
|
||||
{
|
||||
a::assertContainsOnly($type, $this->actual, $isNativeType, $this->description);
|
||||
}
|
||||
|
||||
public function notContainsOnly($type, $isNativeType = NULL)
|
||||
{
|
||||
a::assertNotContainsOnly($type, $this->actual, $isNativeType, $this->description);
|
||||
}
|
||||
|
||||
public function containsOnlyInstancesOf($class)
|
||||
{
|
||||
a::assertContainsOnlyInstancesOf($class, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function count($array)
|
||||
{
|
||||
a::assertCount($array, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notCount($array)
|
||||
{
|
||||
a::assertNotCount($array, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function equalXMLStructure($xml, $checkAttributes = FALSE)
|
||||
{
|
||||
a::assertEqualXMLStructure($xml, $this->actual, $checkAttributes, $this->description);
|
||||
}
|
||||
|
||||
public function exists()
|
||||
{
|
||||
if (!$this->isFileExpectation ) {
|
||||
throw new \Exception('exists() expectation should be called with expect_file()');
|
||||
}
|
||||
a::assertFileExists($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notExists()
|
||||
{
|
||||
if (!$this->isFileExpectation ) {
|
||||
throw new \Exception('notExists() expectation should be called with expect_file()');
|
||||
}
|
||||
a::assertFileNotExists($this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function equalsJsonFile($file)
|
||||
{
|
||||
if (!$this->isFileExpectation ) {
|
||||
a::assertJsonStringEqualsJsonFile($file, $this->actual, $this->description);
|
||||
} else {
|
||||
a::assertJsonFileEqualsJsonFile($file, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
|
||||
public function equalsJsonString($string)
|
||||
{
|
||||
a::assertJsonStringEqualsJsonString($string, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function regExp($expression)
|
||||
{
|
||||
a::assertRegExp($expression, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function matchesFormat($format)
|
||||
{
|
||||
a::assertStringMatchesFormat($format, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notMatchesFormat($format)
|
||||
{
|
||||
a::assertStringNotMatchesFormat($format, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function matchesFormatFile($formatFile)
|
||||
{
|
||||
a::assertStringMatchesFormatFile($formatFile, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notMatchesFormatFile($formatFile)
|
||||
{
|
||||
a::assertStringNotMatchesFormatFile($formatFile, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function same($expected)
|
||||
{
|
||||
a::assertSame($expected, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notSame($expected)
|
||||
{
|
||||
a::assertNotSame($expected, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function endsWith($suffix)
|
||||
{
|
||||
a::assertStringEndsWith($suffix, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notEndsWith($suffix)
|
||||
{
|
||||
a::assertStringEndsNotWith($suffix, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function equalsFile($file)
|
||||
{
|
||||
a::assertStringEqualsFile($file, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notEqualsFile($file)
|
||||
{
|
||||
a::assertStringNotEqualsFile($file, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function startsWith($prefix)
|
||||
{
|
||||
a::assertStringStartsWith($prefix, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function notStartsWith($prefix)
|
||||
{
|
||||
a::assertStringStartsNotWith($prefix, $this->actual, $this->description);
|
||||
}
|
||||
|
||||
public function equalsXmlFile($file)
|
||||
{
|
||||
if (!$this->isFileExpectation ) {
|
||||
a::assertXmlStringEqualsXmlFile($file, $this->actual, $this->description);
|
||||
} else {
|
||||
a::assertXmlFileEqualsXmlFile($file, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
|
||||
public function equalsXmlString($xmlString)
|
||||
{
|
||||
a::assertXmlStringEqualsXmlString($xmlString, $this->actual, $this->description);
|
||||
}
|
||||
}
|
||||
72
vendor/codeception/verify/src/Codeception/function.php
vendored
Normal file
72
vendor/codeception/verify/src/Codeception/function.php
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
if (!function_exists('verify')) {
|
||||
|
||||
/**
|
||||
* @param $description
|
||||
* @param null $actual
|
||||
* @return \Codeception\Verify
|
||||
*/
|
||||
function verify($description) {
|
||||
include_once __DIR__.'/Verify.php';
|
||||
|
||||
$reflect = new ReflectionClass('\Codeception\Verify');
|
||||
return $reflect->newInstanceArgs(func_get_args());
|
||||
}
|
||||
|
||||
function verify_that($truth) {
|
||||
verify($truth)->notEmpty();
|
||||
}
|
||||
|
||||
function verify_not($fallacy) {
|
||||
verify($fallacy)->isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('expect')) {
|
||||
|
||||
/**
|
||||
* @param $description
|
||||
* @param null $actual
|
||||
* @return \Codeception\Verify
|
||||
*/
|
||||
function expect() {
|
||||
return call_user_func_array('verify', func_get_args());
|
||||
}
|
||||
|
||||
function expect_that($truth) {
|
||||
expect($truth)->notEmpty();
|
||||
}
|
||||
|
||||
function expect_not($fallacy) {
|
||||
expect($fallacy)->isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!function_exists('verify_file')) {
|
||||
|
||||
/**
|
||||
* @param $description
|
||||
* @param null $actual
|
||||
* @return \Codeception\Verify
|
||||
*/
|
||||
function verify_file() {
|
||||
include_once __DIR__.'/Verify.php';
|
||||
|
||||
$reflect = new ReflectionClass('\Codeception\Verify');
|
||||
$verify = $reflect->newInstanceArgs(func_get_args());
|
||||
$verify->setIsFileExpectation(true);
|
||||
return $verify;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('expect_file')) {
|
||||
/**
|
||||
* @param $description
|
||||
* @param null $actual
|
||||
* @return \Codeception\Verify
|
||||
*/
|
||||
function expect_file() {
|
||||
return call_user_func_array('verify_file', func_get_args());
|
||||
}
|
||||
}
|
||||
229
vendor/codeception/verify/tests/VerifyTest.php
vendored
Normal file
229
vendor/codeception/verify/tests/VerifyTest.php
vendored
Normal file
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
|
||||
include __DIR__.'/../src/Codeception/function.php';
|
||||
include __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
class VerifyTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
protected $xml;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->xml = new DomDocument;
|
||||
$this->xml->loadXML('<foo><bar>Baz</bar><bar>Baz</bar></foo>');
|
||||
}
|
||||
|
||||
public function testEquals()
|
||||
{
|
||||
verify(5)->equals(5);
|
||||
verify("hello")->equals("hello");
|
||||
verify("user have 5 posts", 5)->equals(5);
|
||||
verify(3.251)->equals(3.25, 0.01);
|
||||
verify("respects delta", 3.251)->equals(3.25, 0.01);
|
||||
verify_file(__FILE__)->equals(__FILE__);
|
||||
}
|
||||
|
||||
public function testNotEquals()
|
||||
{
|
||||
verify(3)->notEquals(5);
|
||||
verify(3.252)->notEquals(3.25, 0.001);
|
||||
verify("respects delta", 3.252, 0.001);
|
||||
verify_file(__FILE__)->notEquals(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'composer.json');
|
||||
}
|
||||
|
||||
public function testContains()
|
||||
{
|
||||
verify(array(3, 2))->contains(3);
|
||||
verify("user have 5 posts", array(3, 2))->notContains(5);
|
||||
}
|
||||
|
||||
public function testGreaterLowerThan()
|
||||
{
|
||||
verify(7)->greaterThan(5);
|
||||
verify(7)->lessThan(10);
|
||||
verify(7)->lessOrEquals(7);
|
||||
verify(7)->lessOrEquals(8);
|
||||
verify(7)->greaterOrEquals(7);
|
||||
verify(7)->greaterOrEquals(5);
|
||||
}
|
||||
|
||||
public function testTrueFalseNull()
|
||||
{
|
||||
verify(true)->true();
|
||||
verify(false)->false();
|
||||
verify(null)->null();
|
||||
verify(true)->notNull();
|
||||
verify('something should be false', false)->false();
|
||||
verify('something should be true', true)->true();
|
||||
}
|
||||
|
||||
public function testEmptyNotEmpty()
|
||||
{
|
||||
verify(array('3', '5'))->notEmpty();
|
||||
verify(array())->isEmpty();
|
||||
}
|
||||
|
||||
public function testVerifyThat()
|
||||
{
|
||||
verify_that(12);
|
||||
verify_that('hello world');
|
||||
verify_that(array('hello'));
|
||||
}
|
||||
|
||||
public function testVerifyNot()
|
||||
{
|
||||
verify_not(false);
|
||||
verify_not(null);
|
||||
verify_not(array());
|
||||
}
|
||||
|
||||
public function testExpectFunctions()
|
||||
{
|
||||
expect(12)->equals(12);
|
||||
expect_that(true);
|
||||
expect_not(false);
|
||||
}
|
||||
|
||||
public function testArrayHasKey()
|
||||
{
|
||||
$errors = array('title' => 'You should add title');
|
||||
expect($errors)->hasKey('title');
|
||||
expect($errors)->hasntKey('body');
|
||||
}
|
||||
|
||||
public function testIsInstanceOf()
|
||||
{
|
||||
$testClass = new DateTime();
|
||||
expect($testClass)->isInstanceOf('DateTime');
|
||||
expect($testClass)->isNotInstanceOf('DateTimeZone');
|
||||
}
|
||||
|
||||
public function testInternalType()
|
||||
{
|
||||
$testVar = array();
|
||||
expect($testVar)->internalType('array');
|
||||
expect($testVar)->notInternalType('boolean');
|
||||
}
|
||||
|
||||
public function testHasAttribute()
|
||||
{
|
||||
expect('Exception')->hasAttribute('message');
|
||||
expect('Exception')->notHasAttribute('fakeproperty');
|
||||
|
||||
$testObject = (object) array('existingAttribute' => true);
|
||||
expect($testObject)->hasAttribute('existingAttribute');
|
||||
expect($testObject)->notHasAttribute('fakeproperty');
|
||||
}
|
||||
|
||||
public function testHasStaticAttribute()
|
||||
{
|
||||
expect('FakeClassForTesting')->hasStaticAttribute('staticProperty');
|
||||
expect('FakeClassForTesting')->notHasStaticAttribute('fakeProperty');
|
||||
}
|
||||
|
||||
public function testContainsOnly()
|
||||
{
|
||||
expect(array('1', '2', '3'))->containsOnly('string');
|
||||
expect(array('1', '2', 3))->notContainsOnly('string');
|
||||
}
|
||||
|
||||
public function testContainsOnlyInstancesOf()
|
||||
{
|
||||
expect(array(new FakeClassForTesting(), new FakeClassForTesting(), new FakeClassForTesting()))
|
||||
->containsOnlyInstancesOf('FakeClassForTesting');
|
||||
}
|
||||
|
||||
public function testCount()
|
||||
{
|
||||
expect(array(1,2,3))->count(3);
|
||||
expect(array(1,2,3))->notCount(2);
|
||||
}
|
||||
|
||||
public function testEqualXMLStructure()
|
||||
{
|
||||
$expected = new DOMElement('foo');
|
||||
$actual = new DOMElement('foo');
|
||||
|
||||
expect($expected)->equalXMLStructure($actual);
|
||||
}
|
||||
|
||||
public function testFileExists()
|
||||
{
|
||||
expect_file(__FILE__)->exists();
|
||||
expect_file('completelyrandomfilename.txt')->notExists();
|
||||
}
|
||||
|
||||
public function testEqualsJsonFile()
|
||||
{
|
||||
expect_file(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'json-test-file.json')
|
||||
->equalsJsonFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'equal-json-test-file.json');
|
||||
expect('{"some" : "data"}')->equalsJsonFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'equal-json-test-file.json');
|
||||
}
|
||||
|
||||
public function testEqualsJsonString()
|
||||
{
|
||||
expect('{"some" : "data"}')->equalsJsonString('{"some" : "data"}');
|
||||
}
|
||||
|
||||
public function testRegExp()
|
||||
{
|
||||
expect('somestring')->regExp('/string/');
|
||||
}
|
||||
|
||||
public function testMatchesFormat()
|
||||
{
|
||||
expect('somestring')->matchesFormat('%s');
|
||||
expect('somestring')->notMatchesFormat('%i');
|
||||
}
|
||||
|
||||
public function testMatchesFormatFile()
|
||||
{
|
||||
expect('23')->matchesFormatFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'format-file.txt');
|
||||
expect('asdfas')->notMatchesFormatFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'format-file.txt');
|
||||
}
|
||||
|
||||
public function testSame()
|
||||
{
|
||||
expect(1)->same(0+1);
|
||||
expect(1)->notSame(true);
|
||||
}
|
||||
|
||||
public function testEndsWith()
|
||||
{
|
||||
expect('A completely not funny string')->endsWith('ny string');
|
||||
expect('A completely not funny string')->notEndsWith('A completely');
|
||||
}
|
||||
|
||||
public function testEqualsFile()
|
||||
{
|
||||
expect('%i')->equalsFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'format-file.txt');
|
||||
expect('Another string')->notEqualsFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'format-file.txt');
|
||||
}
|
||||
|
||||
public function testStartsWith()
|
||||
{
|
||||
expect('A completely not funny string')->startsWith('A completely');
|
||||
expect('A completely not funny string')->notStartsWith('string');
|
||||
}
|
||||
|
||||
public function testEqualsXmlFile()
|
||||
{
|
||||
expect_file(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'xml-test-file.xml')
|
||||
->equalsXmlFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'xml-test-file.xml');
|
||||
expect('<foo><bar>Baz</bar><bar>Baz</bar></foo>')
|
||||
->equalsXmlFile(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'xml-test-file.xml');
|
||||
}
|
||||
|
||||
public function testEqualsXmlString()
|
||||
{
|
||||
expect('<foo><bar>Baz</bar><bar>Baz</bar></foo>')
|
||||
->equalsXmlString('<foo><bar>Baz</bar><bar>Baz</bar></foo>');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class FakeClassForTesting
|
||||
{
|
||||
static $staticProperty;
|
||||
}
|
||||
3
vendor/codeception/verify/tests/assets/equal-json-test-file.json
vendored
Normal file
3
vendor/codeception/verify/tests/assets/equal-json-test-file.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"some" : "data"
|
||||
}
|
||||
1
vendor/codeception/verify/tests/assets/format-file.txt
vendored
Normal file
1
vendor/codeception/verify/tests/assets/format-file.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
%i
|
||||
3
vendor/codeception/verify/tests/assets/json-test-file.json
vendored
Normal file
3
vendor/codeception/verify/tests/assets/json-test-file.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"some" : "data"
|
||||
}
|
||||
1
vendor/codeception/verify/tests/assets/xml-test-file.xml
vendored
Normal file
1
vendor/codeception/verify/tests/assets/xml-test-file.xml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<foo><bar>Baz</bar><bar>Baz</bar></foo>
|
||||
Reference in New Issue
Block a user