2020
2121class TransportsTest extends TestCase
2222{
23- public function test_send_to_transport_defined_by_message (): void
23+ public function testSendToTransportDefinedByMessage (): void
2424 {
2525 $ transports = new Transports ([
2626 'one ' => $ one = $ this ->createMock (TransportInterface::class),
@@ -35,31 +35,25 @@ public function test_send_to_transport_defined_by_message(): void
3535 $ transports ->send ($ message );
3636 }
3737
38- public function test_send_to_all_supported_transports_if_message_does_not_define_a_transport (): void
38+ public function testSendToFirstSupportedTransportIfMessageDoesNotDefineATransport (): void
3939 {
4040 $ transports = new Transports ([
4141 'one ' => $ one = $ this ->createMock (TransportInterface::class),
4242 'two ' => $ two = $ this ->createMock (TransportInterface::class),
43- 'three ' => $ three = $ this ->createMock (TransportInterface::class),
44- 'four ' => $ four = $ this ->createMock (TransportInterface::class),
4543 ]);
4644
4745 $ message = new ChatMessage ('subject ' );
4846
4947 $ one ->method ('supports ' )->with ($ message )->willReturn (false );
5048 $ two ->method ('supports ' )->with ($ message )->willReturn (true );
51- $ three ->method ('supports ' )->with ($ message )->willReturn (false );
52- $ four ->method ('supports ' )->with ($ message )->willReturn (true );
5349
5450 $ one ->expects ($ this ->never ())->method ('send ' );
5551 $ two ->expects ($ this ->once ())->method ('send ' );
56- $ three ->expects ($ this ->never ())->method ('send ' );
57- $ four ->expects ($ this ->once ())->method ('send ' );
5852
5953 $ transports ->send ($ message );
6054 }
6155
62- public function test_throw_exception_if_no_supported_transport_was_found (): void
56+ public function testThrowExceptionIfNoSupportedTransportWasFound (): void
6357 {
6458 $ transports = new Transports ([
6559 'one ' => $ one = $ this ->createMock (TransportInterface::class),
@@ -75,7 +69,7 @@ public function test_throw_exception_if_no_supported_transport_was_found(): void
7569 $ transports ->send ($ message );
7670 }
7771
78- public function test_throw_exception_if_transport_defined_by_message_is_not_supported (): void
72+ public function testThrowExceptionIfTransportDefinedByMessageIsNotSupported (): void
7973 {
8074 $ transports = new Transports ([
8175 'one ' => $ one = $ this ->createMock (TransportInterface::class),
@@ -94,7 +88,7 @@ public function test_throw_exception_if_transport_defined_by_message_is_not_supp
9488 $ transports ->send ($ message );
9589 }
9690
97- public function test_throw_exception_if_transport_defined_by_message_does_not_exist ()
91+ public function testThrowExceptionIfTransportDefinedByMessageDoesNotExist ()
9892 {
9993 $ transports = new Transports ([
10094 'one ' => $ one = $ this ->createMock (TransportInterface::class),
0 commit comments