Skip to content

Commit

Permalink
Merge pull request #17 from yaroslavche/bc_check
Browse files Browse the repository at this point in the history
Bc check
  • Loading branch information
yaroslavche authored Jun 5, 2019
2 parents 8e1f260 + 59f9c51 commit 393f7fd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 126 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ script:
- composer cscheck
- composer phpstan
- composer phpunit
# - composer bccheck
- composer infection
- composer clover
after_success:
Expand Down
15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"php7"
],
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpbench/phpbench": "master",
"phpunit/phpunit": "^8.1",
"phpbench/phpbench": "^0.16.9",
"phpstan/phpstan": "^0.11.8",
"squizlabs/php_codesniffer": "^3.4",
"thecodingmachine/phpstan-strict-rules": "^0.11.0",
"doctrine/dbal": "^2.9",
"infection/infection": "^0.13.1"
"thecodingmachine/phpstan-strict-rules": "^0.11.1",
"infection/infection": "^0.13.1",
"roave/backward-compatibility-check": "^3.0"
},
"authors": [
{
Expand All @@ -44,8 +44,9 @@
"phpstan": "phpstan analyse src/ -c phpstan.neon --level=7 --no-progress -vvv --memory-limit=1024M",
"benchmarks": "phpbench run benchmarks --report=default",
"phpunit": "phpunit",
"infection": "infection --min-msi=50 --min-covered-msi=70",
"clover": "phpunit --coverage-clover clover.xml"
"infection": "infection --min-msi=50 --min-covered-msi=70 --log-verbosity=all",
"clover": "phpunit --coverage-clover clover.xml",
"bccheck": "roave-backward-compatibility-check"
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down
43 changes: 0 additions & 43 deletions src/Doctrine/Types/BitMaskType.php

This file was deleted.

17 changes: 12 additions & 5 deletions tests/AssociativeBitMaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ public function testSet()
public function testSetInvalidMask()
{
$bitmask = new AssociativeBitMask(['r', 'w', 'x']);
$this->expectExceptionMessageRegExp('/Invalid given mask "[\d+]". Maximum value for [\d+] keys is [\d+]$/');
$bitmask->set(8);
try {
$bitmask->set(8);
} catch (InvalidArgumentException $exception) {
$this->assertRegExp('/Invalid given mask "[\d+]". Maximum value for [\d+] keys is [\d+]$/', $exception->getMessage());
}
$this->assertSame(0, $bitmask->get());
}

public function testUnset()
Expand Down Expand Up @@ -138,6 +142,7 @@ public function testSetBit()
} catch (InvalidArgumentException $exception) {
$this->assertSame('Argument must be a single bit', $exception->getMessage());
}
$this->assertSame(5, $bitmask->get());
}

public function testUnsetBit()
Expand All @@ -149,10 +154,12 @@ public function testUnsetBit()
$this->assertFalse($bitmask->isSetBit(2));
$bitmask->unsetBit(4);
$this->assertFalse($bitmask->isSetBit(4));
try {
$bitmask->unsetBit(3);
} catch (InvalidArgumentException $exception) {
$this->assertSame('Argument must be a single bit', $exception->getMessage());
}
$this->assertSame(0, $bitmask->get());
$this->expectExceptionObject(new InvalidArgumentException('Argument must be a single bit'));
$bitmask->unsetBit(3);
$this->assertEquals(0, $bitmask->get());
}

public function testJsonSerialize()
Expand Down
71 changes: 0 additions & 71 deletions tests/Doctrine/Types/BitMaskTypeTest.php

This file was deleted.

0 comments on commit 393f7fd

Please sign in to comment.