'bar']); $this->assertInstanceOf(Alipay::class, $alipay); $this->assertInstanceOf(GatewayApplicationInterface::class, $alipay); } public function testWechatGateway() { $wechat = Pay::wechat(['foo' => 'bar']); $this->assertInstanceOf(Wechat::class, $wechat); $this->assertInstanceOf(GatewayApplicationInterface::class, $wechat); } public function testFooGateway() { $this->expectException(InvalidGatewayException::class); $this->expectExceptionMessage('INVALID_GATEWAY: Gateway [foo] Not Exists'); Pay::foo([]); } }