mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Support PHP 5.5.9+
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM php:5.6-cli
|
FROM php:5.5-cli
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tools & libraries
|
# Tools & libraries
|
||||||
|
|||||||
@@ -11,18 +11,18 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0",
|
"php": ">=5.5.9",
|
||||||
"doctrine/orm": "^2.5",
|
"doctrine/orm": "^2.5",
|
||||||
"gedmo/doctrine-extensions": "^2.4",
|
"gedmo/doctrine-extensions": "^2.4",
|
||||||
"symfony/http-foundation": "^3.3"
|
"symfony/http-foundation": "^3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"friendsofphp/php-cs-fixer": "^2.7",
|
"friendsofphp/php-cs-fixer": "^2.2",
|
||||||
"pdepend/pdepend": "^2.5",
|
"pdepend/pdepend": "^2.5",
|
||||||
"phploc/phploc": "^4.0",
|
"phploc/phploc": "^2.1",
|
||||||
"phpmd/phpmd": "^2.6",
|
"phpmd/phpmd": "^2.6",
|
||||||
"phpunit/phpunit": "^5.7",
|
"phpunit/phpunit": "^4.8",
|
||||||
"sebastian/phpcpd": "^3.0",
|
"sebastian/phpcpd": "^2.0",
|
||||||
"squizlabs/php_codesniffer": "^2.9"
|
"squizlabs/php_codesniffer": "^2.9"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -34,5 +34,8 @@
|
|||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Meritoo\\Common\\Test\\": "tests/"
|
"Meritoo\\Common\\Test\\": "tests/"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class UnknownTypeExceptionTest extends BaseTestCase
|
|||||||
|
|
||||||
public function testTheException()
|
public function testTheException()
|
||||||
{
|
{
|
||||||
$this->expectException(UnknownTestTypeException::class);
|
$this->setExpectedException(UnknownTestTypeException::class);
|
||||||
self::assertEmpty((new TestService())->getTranslatedType('test_3'));
|
self::assertEmpty((new TestService())->getTranslatedType('test_3'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ class DateTest extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetDayOfWeekIncorrectValues($year, $month, $day)
|
public function testGetDayOfWeekIncorrectValues($year, $month, $day)
|
||||||
{
|
{
|
||||||
$this->expectException(UnknownDatePartTypeException::class);
|
$this->setExpectedException(UnknownDatePartTypeException::class);
|
||||||
self::assertEmpty(Date::getDayOfWeek($year, $month, $day));
|
self::assertEmpty(Date::getDayOfWeek($year, $month, $day));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -663,7 +663,8 @@ class MiscellaneousTest extends BaseTestCase
|
|||||||
|
|
||||||
public function testGetInvertedColorWithIncorrectLength()
|
public function testGetInvertedColorWithIncorrectLength()
|
||||||
{
|
{
|
||||||
$this->expectException(IncorrectColorHexLengthException::class);
|
$this->setExpectedException(IncorrectColorHexLengthException::class);
|
||||||
|
|
||||||
Miscellaneous::getInvertedColor(null);
|
Miscellaneous::getInvertedColor(null);
|
||||||
Miscellaneous::getInvertedColor('');
|
Miscellaneous::getInvertedColor('');
|
||||||
Miscellaneous::getInvertedColor(1);
|
Miscellaneous::getInvertedColor(1);
|
||||||
@@ -676,7 +677,8 @@ class MiscellaneousTest extends BaseTestCase
|
|||||||
|
|
||||||
public function testGetInvertedColorWithInvalidValue()
|
public function testGetInvertedColorWithInvalidValue()
|
||||||
{
|
{
|
||||||
$this->expectException(InvalidColorHexValueException::class);
|
$this->setExpectedException(InvalidColorHexValueException::class);
|
||||||
|
|
||||||
Miscellaneous::getInvertedColor('0011zz');
|
Miscellaneous::getInvertedColor('0011zz');
|
||||||
Miscellaneous::getInvertedColor('001#zz');
|
Miscellaneous::getInvertedColor('001#zz');
|
||||||
Miscellaneous::getInvertedColor('001!zz');
|
Miscellaneous::getInvertedColor('001!zz');
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class ReflectionTest extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetChildClassesInvalidClass($invalidClass)
|
public function testGetChildClassesInvalidClass($invalidClass)
|
||||||
{
|
{
|
||||||
$this->expectException(CannotResolveClassNameException::class);
|
$this->setExpectedException(CannotResolveClassNameException::class);
|
||||||
|
|
||||||
self::assertNull(Reflection::getChildClasses($invalidClass));
|
self::assertNull(Reflection::getChildClasses($invalidClass));
|
||||||
self::assertNull(Reflection::getChildClasses(123));
|
self::assertNull(Reflection::getChildClasses(123));
|
||||||
@@ -130,7 +130,7 @@ class ReflectionTest extends BaseTestCase
|
|||||||
|
|
||||||
public function testGetChildClassesNotExistingClass()
|
public function testGetChildClassesNotExistingClass()
|
||||||
{
|
{
|
||||||
$this->expectException(CannotResolveClassNameException::class);
|
$this->setExpectedException(CannotResolveClassNameException::class);
|
||||||
self::assertEquals('', Reflection::getChildClasses('xyz'));
|
self::assertEquals('', Reflection::getChildClasses('xyz'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,13 +161,13 @@ class ReflectionTest extends BaseTestCase
|
|||||||
|
|
||||||
public function testGetOneChildClassWithMissingChildClasses()
|
public function testGetOneChildClassWithMissingChildClasses()
|
||||||
{
|
{
|
||||||
$this->expectException(MissingChildClassesException::class);
|
$this->setExpectedException(MissingChildClassesException::class);
|
||||||
self::assertEquals('LoremIpsum', Reflection::getOneChildClass(C::class));
|
self::assertEquals('LoremIpsum', Reflection::getOneChildClass(C::class));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetOneChildClassWithTooManyChildClasses()
|
public function testGetOneChildClassWithTooManyChildClasses()
|
||||||
{
|
{
|
||||||
$this->expectException(TooManyChildClassesException::class);
|
$this->setExpectedException(TooManyChildClassesException::class);
|
||||||
|
|
||||||
self::assertEquals(B::class, Reflection::getOneChildClass(A::class));
|
self::assertEquals(B::class, Reflection::getOneChildClass(A::class));
|
||||||
self::assertEquals(C::class, Reflection::getOneChildClass(A::class));
|
self::assertEquals(C::class, Reflection::getOneChildClass(A::class));
|
||||||
@@ -195,7 +195,7 @@ class ReflectionTest extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
public function testUsesTraitInvalidClass($class, $trait)
|
public function testUsesTraitInvalidClass($class, $trait)
|
||||||
{
|
{
|
||||||
$this->expectException(CannotResolveClassNameException::class);
|
$this->setExpectedException(CannotResolveClassNameException::class);
|
||||||
self::assertNull(Reflection::usesTrait($class, $trait));
|
self::assertNull(Reflection::usesTrait($class, $trait));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ class ReflectionTest extends BaseTestCase
|
|||||||
*/
|
*/
|
||||||
public function testUsesTraitInvalidTrait($trait)
|
public function testUsesTraitInvalidTrait($trait)
|
||||||
{
|
{
|
||||||
$this->expectException(CannotResolveClassNameException::class);
|
$this->setExpectedException(CannotResolveClassNameException::class);
|
||||||
self::assertNull(Reflection::usesTrait(DateTime::class, $trait));
|
self::assertNull(Reflection::usesTrait(DateTime::class, $trait));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user