Skip to content

Commit

Permalink
Merge branch 'master' of github-sunrise-php:sunrise-php/vin
Browse files Browse the repository at this point in the history
  • Loading branch information
fenric committed Mar 5, 2019
2 parents b38068a + ead0a27 commit e1c13dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "7.5.4"
"phpunit/phpunit": "7.5.6"
},
"autoload": {
"files": [
Expand Down
10 changes: 0 additions & 10 deletions src/VinInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@
*/
interface VinInterface
{

/**
* Constructor of the class
*
* @param string $value
*
* @throws \InvalidArgumentException If the given value is not a valid VIN
*/
public function __construct(string $value);

/**
* Gets the VIN
*
Expand Down
3 changes: 3 additions & 0 deletions tests/VinTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ public function testConstructor()
public function testVinLessThan17Characters()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The value "AAAAAAAAAAAAAAAA" is not a valid VIN');

new Vin(\str_repeat('A', 16));
}

public function testVinMoreThan17Characters()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The value "AAAAAAAAAAAAAAAAAA" is not a valid VIN');

new Vin(\str_repeat('A', 18));
}
Expand All @@ -37,6 +39,7 @@ public function testVinMoreThan17Characters()
public function testVinWithForbiddenCharacters($value)
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage(\sprintf('The value "AAAAAAAAAAAAAAAA%s" is not a valid VIN', $value));

new Vin(\str_repeat('A', 16) . $value);
}
Expand Down

0 comments on commit e1c13dd

Please sign in to comment.