mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
PHP Coding Standards Fixer > fix coding standard
This commit is contained in:
@@ -17,6 +17,9 @@ use Meritoo\Common\ValueObject\Address;
|
||||
*
|
||||
* @author Meritoo <github@meritoo.pl>
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\ValueObject\Address
|
||||
*/
|
||||
class AddressTest extends BaseTestCase
|
||||
{
|
||||
@@ -35,6 +38,15 @@ class AddressTest extends BaseTestCase
|
||||
*/
|
||||
private $addressWithoutStreet;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->address = new Address('New York', '00123', '4th Avenue', '10', '200');
|
||||
$this->addressWithoutFlat = new Address('San Francisco', '00456', 'Green Street', '22');
|
||||
$this->addressWithoutStreet = new Address('Saint Louis', '00111', '', '1', '300');
|
||||
}
|
||||
|
||||
public function testConstructor()
|
||||
{
|
||||
static::assertConstructorVisibilityAndArguments(
|
||||
@@ -93,13 +105,4 @@ class AddressTest extends BaseTestCase
|
||||
static::assertSame('Green Street 22, 00456, San Francisco', (string)$this->addressWithoutFlat);
|
||||
static::assertSame('00111, Saint Louis', (string)$this->addressWithoutStreet);
|
||||
}
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->address = new Address('New York', '00123', '4th Avenue', '10', '200');
|
||||
$this->addressWithoutFlat = new Address('San Francisco', '00456', 'Green Street', '22');
|
||||
$this->addressWithoutStreet = new Address('Saint Louis', '00111', '', '1', '300');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ use Meritoo\Common\ValueObject\BankAccount;
|
||||
*
|
||||
* @author Meritoo <github@meritoo.pl>
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\ValueObject\BankAccount
|
||||
*/
|
||||
class BankAccountTest extends BaseTestCase
|
||||
{
|
||||
@@ -30,6 +33,17 @@ class BankAccountTest extends BaseTestCase
|
||||
*/
|
||||
private $bankAccount;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->emptyBankAccount = new BankAccount('', '');
|
||||
$this->bankAccount = new BankAccount('Bank of America', '1234567890');
|
||||
}
|
||||
|
||||
public function testConstructor()
|
||||
{
|
||||
static::assertConstructorVisibilityAndArguments(
|
||||
@@ -57,15 +71,4 @@ class BankAccountTest extends BaseTestCase
|
||||
static::assertSame('', (string)$this->emptyBankAccount);
|
||||
static::assertSame('Bank of America, 1234567890', (string)$this->bankAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->emptyBankAccount = new BankAccount('', '');
|
||||
$this->bankAccount = new BankAccount('Bank of America', '1234567890');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ use Meritoo\Common\ValueObject\Company;
|
||||
*
|
||||
* @author Meritoo <github@meritoo.pl>
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\ValueObject\Company
|
||||
*/
|
||||
class CompanyTest extends BaseTestCase
|
||||
{
|
||||
@@ -32,6 +35,25 @@ class CompanyTest extends BaseTestCase
|
||||
*/
|
||||
private $companyWithoutBankAccount;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->company = new Company(
|
||||
'Test 1',
|
||||
new Address('New York', '00123', '4th Avenue', '10', '200'),
|
||||
new BankAccount('Bank 1', '12345')
|
||||
);
|
||||
|
||||
$this->companyWithoutBankAccount = new Company(
|
||||
'Test 2',
|
||||
new Address('San Francisco', '00456', 'Green Street', '22')
|
||||
);
|
||||
}
|
||||
|
||||
public function testConstructor()
|
||||
{
|
||||
static::assertConstructorVisibilityAndArguments(
|
||||
@@ -76,23 +98,4 @@ class CompanyTest extends BaseTestCase
|
||||
static::assertSame('Test 1, 4th Avenue 10/200, 00123, New York, Bank 1, 12345', (string)$this->company);
|
||||
static::assertSame('Test 2, Green Street 22, 00456, San Francisco', (string)$this->companyWithoutBankAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->company = new Company(
|
||||
'Test 1',
|
||||
new Address('New York', '00123', '4th Avenue', '10', '200'),
|
||||
new BankAccount('Bank 1', '12345')
|
||||
);
|
||||
|
||||
$this->companyWithoutBankAccount = new Company(
|
||||
'Test 2',
|
||||
new Address('San Francisco', '00456', 'Green Street', '22')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ use Meritoo\Common\ValueObject\Human;
|
||||
*
|
||||
* @author Meritoo <github@meritoo.pl>
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\ValueObject\Human
|
||||
*/
|
||||
class HumanTest extends BaseTestCase
|
||||
{
|
||||
|
||||
@@ -18,6 +18,9 @@ use Meritoo\Common\ValueObject\Size;
|
||||
*
|
||||
* @author Meritoo <github@meritoo.pl>
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\ValueObject\Size
|
||||
*/
|
||||
class SizeTest extends BaseTestCase
|
||||
{
|
||||
@@ -32,12 +35,12 @@ class SizeTest extends BaseTestCase
|
||||
|
||||
/**
|
||||
* @param string $description Description of test
|
||||
* @param Size|null $size Size to convert
|
||||
* @param null|Size $size Size to convert
|
||||
* @param string $expected Expected result
|
||||
*
|
||||
* @dataProvider provideSizeForConvertingToString
|
||||
*/
|
||||
public function test__toString($description, $size, $expected)
|
||||
public function testToStringConverting($description, $size, $expected)
|
||||
{
|
||||
static::assertEquals($expected, (string)$size, $description);
|
||||
}
|
||||
@@ -57,7 +60,7 @@ class SizeTest extends BaseTestCase
|
||||
* @param string $description Description of test
|
||||
* @param Size $size Size to get width
|
||||
* @param bool $withUnit If is set to true, width is returned with unit ("px"). Otherwise - without.
|
||||
* @param string|int $expected Expected width
|
||||
* @param int|string $expected Expected width
|
||||
*
|
||||
* @dataProvider provideSizeToGetWidth
|
||||
*/
|
||||
@@ -70,7 +73,7 @@ class SizeTest extends BaseTestCase
|
||||
* @param string $description Description of test
|
||||
* @param Size $size Size to set width
|
||||
* @param int|string $width The width
|
||||
* @param string|int $expected Expected width
|
||||
* @param int|string $expected Expected width
|
||||
*
|
||||
* @dataProvider provideSizeToSetWidth
|
||||
*/
|
||||
@@ -86,7 +89,7 @@ class SizeTest extends BaseTestCase
|
||||
* @param string $description Description of test
|
||||
* @param Size $size Size to get width
|
||||
* @param bool $withUnit If is set to true, width is returned with unit ("px"). Otherwise - without.
|
||||
* @param string|int $expected Expected width
|
||||
* @param int|string $expected Expected width
|
||||
*
|
||||
* @dataProvider provideSizeToGetHeight
|
||||
*/
|
||||
@@ -99,7 +102,7 @@ class SizeTest extends BaseTestCase
|
||||
* @param string $description Description of test
|
||||
* @param Size $size Size to set height
|
||||
* @param int|string $height The height
|
||||
* @param string|int $expected Expected height
|
||||
* @param int|string $expected Expected height
|
||||
*
|
||||
* @dataProvider provideSizeToSetHeight
|
||||
*/
|
||||
@@ -167,7 +170,7 @@ class SizeTest extends BaseTestCase
|
||||
* @param string $size The size represented as string (width and height separated by "x")
|
||||
* @param string $unit Unit used when width or height should be returned with unit
|
||||
* @param string $separator Separator used to split width and height
|
||||
* @param Size|null $expected Expected result
|
||||
* @param null|Size $expected Expected result
|
||||
*
|
||||
* @dataProvider provideSizeForFromString
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,9 @@ use Meritoo\Common\ValueObject\Version;
|
||||
*
|
||||
* @author Meritoo <github@meritoo.pl>
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\ValueObject\Version
|
||||
*/
|
||||
class VersionTest extends BaseTestCase
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user