Completed
Pull Request — master (#1)
by Tim
64:19
created

ChangeAddressUseCaseTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGivenValidAddressChangeRequest_successResponseIsReturned() 0 4 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\AddressChangeContext\Tests\Unit\Domain\Model;
6
7
use PHPUnit\Framework\TestCase;
8
use WMDE\Fundraising\AddressChange\Domain\AddressChangeRepository;
9
use WMDE\Fundraising\AddressChange\UseCases\ChangeAddress\ChangeAddressUseCase;
10
11
/**
12
 * @covers \WMDE\Fundraising\AddressChange\UseCases\ChangeAddress\ChangeAddressUseCase
13
 */
14
class ChangeAddressUseCaseTest extends TestCase {
15
16
	public function testGivenValidAddressChangeRequest_successResponseIsReturned(): void {
17
		$mockAddressChangeRepository = $this->createMock( AddressChangeRepository::class );
18
		$useCase = new ChangeAddressUseCase( $mockAddressChangeRepository );
19
		$useCase->changeAddress();
0 ignored issues
show
Bug introduced by
The call to WMDE\Fundraising\Address...seCase::changeAddress() has too few arguments starting with request. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
		$useCase->/** @scrutinizer ignore-call */ 
20
            changeAddress();

This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
20
		//TODO FINISH THIS
21
	}
22
}
23