diff --git a/README.md b/README.md index c834ef2..bb8ce82 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ # phpunit-for-bitrix +Based on [osotov/phpunit-for-bitrix](https://github.com/osotov/phpunit-for-bitrix). + Base test class for unit tests inside 1C-Bitrix framework environment ## note -This package requires latest versions of php (>= 5.5.9). +This package requires latest versions of php (>= 5.5.9) and phpunit (>=4.7.0 <7.0.0) + +It might work fine with latest versions (7+) but was tested only with phpunit ^6 (_6.5.8_). ## installation @@ -12,7 +16,7 @@ To install package, run the command below and you will get the latest version ```sh -composer require osotov/phpunit-for-bitrix +composer require dcodeteam/phpunit-for-bitrix ``` Copy phpunit.xml.dist file from package to document root. @@ -21,8 +25,10 @@ If you want to use another bootstrap file set it instead default inside bootstra ## usage -To use this package extend \Osotov\PhpunitForBitrix\BitrixTestCase with your test class. - -This package uses awesome mock framework Mockery to ease mock and stub creation. +If you use _old phpunit_ (>5.0.0) extend `Dcode\Bitrix\TestCase` class in +your test cases. -Additionally package uses Faker to help you with creation of dummy data. \ No newline at end of file +This class uses mock framework Mockery to ease mock and stub creation and it uses Faker to help you with creation of +dummy data. + +For new php unit (>=5.0.0) use `\PHPUnit\Framework\TestCase`. diff --git a/composer.json b/composer.json index b7c1deb..e97016d 100644 --- a/composer.json +++ b/composer.json @@ -1,25 +1,29 @@ { - "name": "osotov/phpunit-for-bitrix", - "description": "Base test class for unit tests inside 1C-Bitrix framework environment", + "name": "dcodeteam/phpunit-for-bitrix", + "type": "library", + "description": "Based on https://github.com/osotov/phpunit-for-bitrix. Base test class for unit tests inside 1C-Bitrix framework environment", "authors": [ { "name": "Mikhail Osotov", "email": "reghan7@gmail.com" + }, + { + "name": "Alexander Lushnikov", + "email": "alegz@dcode.team" } ], "keywords": ["bitrix", "phpunit"], - "homepage": "https://github.com/osotov/phpunit-for-bitrix", + "homepage": "https://github.com/dcodeteam/phpunit-for-bitrix", "license": "MIT", "autoload": { "psr-4": { - "Osotov\\PhpunitForBitrix\\": "src/" - }, - "files": ["bootstrap.php"] + "Dcode\\Bitrix\\": "src/" + } }, "require": { "php": ">=5.5.9", - "phpunit/phpunit": "4.7.*", - "mockery/mockery": "0.9.*", + "phpunit/phpunit": ">=4.7.0", + "mockery/mockery": ">=0.9.0", "fzaninotto/faker": "1.*" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 82cce0b..7d01c98 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ diff --git a/src/BitrixTestCase.php b/src/BitrixTestCase.php index bfef2af..1cbf8c6 100644 --- a/src/BitrixTestCase.php +++ b/src/BitrixTestCase.php @@ -1,6 +1,6 @@