File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ public function testInvokeReturnsConfiguredInstance(): void
2121 {
2222 $ expected = new ClassString (DateTimeImmutable::class);
2323 $ schema = new Schema (['type ' => 'string ' , 'format ' => 'date ' ]);
24- $ container = self ::createStub (ContainerInterface::class);
25- $ container ->method ('get ' )
24+ $ container = $ this ->createMock (ContainerInterface::class);
25+ $ container ->expects (self ::once ())
26+ ->method ('get ' )
2627 ->with ('config ' )
2728 ->willReturn ([
2829 ConfigProvider::GEN_KEY => [
Original file line number Diff line number Diff line change @@ -33,11 +33,13 @@ public function testMapReturnsClassString(): void
3333 $ spec = ['type ' => 'foo ' ];
3434 $ schema = new Schema ($ spec );
3535
36- $ mapper = self ::createStub (TypeMapperInterface::class);
37- $ mapper ->method ('canMap ' )
36+ $ mapper = $ this ->createMock (TypeMapperInterface::class);
37+ $ mapper ->expects (self ::once ())
38+ ->method ('canMap ' )
3839 ->with ('foo ' , null )
3940 ->willReturn (true );
40- $ mapper ->method ('getClassString ' )
41+ $ mapper ->expects (self ::once ())
42+ ->method ('getClassString ' )
4143 ->with ('foo ' , null )
4244 ->willReturn ($ expected ->getClassString ());
4345
@@ -52,8 +54,9 @@ public function testMapCannotMapReturnPropertyType(): void
5254 $ spec = ['type ' => 'string ' , 'format ' => 'datetime ' ];
5355 $ schema = new Schema ($ spec );
5456
55- $ mapper = self ::createStub (TypeMapperInterface::class);
56- $ mapper ->method ('canMap ' )
57+ $ mapper = $ this ->createMock (TypeMapperInterface::class);
58+ $ mapper ->expects (self ::once ())
59+ ->method ('canMap ' )
5760 ->with ('string ' , 'datetime ' )
5861 ->willReturn (false );
5962
You can’t perform that action at this time.
0 commit comments