Skip to content

Commit 4b73265

Browse files
committed
wip
1 parent 22fb320 commit 4b73265

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

tests/VatCalculatorTest.php

+4-20
Original file line numberDiff line numberDiff line change
@@ -423,25 +423,10 @@ public function test_cannot_validate_vat_number_when_service_is_down()
423423
$vatCalculator->isValidVATNumber($vatNumber);
424424
}
425425

426-
public function test_can_validate_valid_ukvat_number()
426+
public function test_cannot_validate_valid_ukvat_numbers()
427427
{
428-
$config = m::mock(Repository::class);
429-
$config->shouldReceive('get')
430-
->once()
431-
->with('vat_calculator', [])
432-
->andReturn([]);
433-
434-
$result = new \stdClass;
435-
$result->valid = true;
436-
437-
$vatNumber = 'GB 553557881';
438-
$vatCalculator = new VatCalculator($config);
439-
$result = $vatCalculator->testing()->isValidVATNumber($vatNumber);
440-
$this->assertTrue($result);
441-
}
428+
$this->expectException(VATCheckUnavailableException::class);
442429

443-
public function test_can_validate_invalid_ukvat_number()
444-
{
445430
$config = m::mock(Repository::class);
446431
$config->shouldReceive('get')
447432
->once()
@@ -451,10 +436,9 @@ public function test_can_validate_invalid_ukvat_number()
451436
$result = new \stdClass;
452437
$result->valid = true;
453438

454-
$vatNumber = 'GB Invalid';
439+
$vatNumber = 'GB 553557881';
455440
$vatCalculator = new VatCalculator($config);
456-
$result = $vatCalculator->testing()->isValidVATNumber($vatNumber);
457-
$this->assertFalse($result);
441+
$vatCalculator->isValidVATNumber($vatNumber);
458442
}
459443

460444
public function test_company_in_business_country_gets_valid_vat_rate()

0 commit comments

Comments
 (0)